Ticket Created
over 4 years ago

WERETECH-11175

set/getProperty deprecate on sdk 4?

In current doc something has changed!!

Previous information: some function (e.g. deleteProperty) was planned to remove but not set/get.

My app run well and there are values in sim Application.AppBase.Data.

So, is documentation correct?

I have some strange app behaviour on sim:

- settings don't change

- memory peaks

- console  message "Unable to serialize app data"

- resetting settings to default

can be connected with any changes in sdk 4?

  • It'll be removed form CIQ on devices so it'll be possible to compile code with set/getProporty with sdk >4 for devices with ciq <4, correct?

    The functions would not exist for devices with ConnectIQ 5.x (System 6) support, but would exist for earlier devices. i.e., we would leave existing devices as-is (simulated and physical devices), and future devices would just not have those functions at all.

    The easiest way around this is to have a wrapper that is conditionally compiled. You can use build exclusions to select which file/function is compiled in for each device.

    // source-classicStorage/MyStorage.mc
    module MyStorage
    {
        var _theApp;
    
        function _getApp() {
            if (_theApp == null) {
                _theApp = Application.getApp();
            }
            
            return _theApp;
        }
    
        function getValue(key) {
            return _getApp().getProperty(key);
        }
        
        function setValue(key, val) {
            return _getApp().setProperty(key, val);
        }
        
        function deleteValue(key) {
            return _getApp().deleteProperty(key);
        }
        
        function clearValues() {
            return _theApp().clearProperties();
        }
    }
    
    // source-modernStorage/MyStorage.mc
    module MyStorage
    {
        function getValue(key) {
            return Storage.getValue(key);
        }
    
        function setValue(key, val) {
            return Storage.setValue(key, val);
        }
        
        function deleteValue(key) {
            return Storage.deleteValue(key);
        }
        
        function clearValues() {
            return Storage.clearValues();
        }
    }
    
    
    

    // default.jungle
    project.manifest = manifest.xml
    
    # devices that do not have Application.Storage module go here
    vivoactive_hr.sourcePath = $(vivoactive_hr.sourcePath);source-classicStorage
    
    # devices that do have Application.Storage module go here
    fenix6.sourcePath = $(fenix6.sourcePath);source-modernStorage

  • "but it's only software, find good app in your comp and sign new manifest"

    True. It's probably just signed with your dev key.

  • yes, you are right I haven't noticed manifest.sig

    but it's only software, find good app in your comp and sign new manifest Slight smile

  • I mean obviously if you do 2 exports you can get signatures for all the PRGs.

    But then I'm not sure how you'll sign the new manifest file that you create from the merging the two builds. (i.e. In a supported way...)

  • "7. iq's == zip, so put all directory from iq2 to iq1

    8 merge mainifest.xml "

    ---

    Like I said, the manifest and PRGs are signed.

    See manifest.xml ("sig" attributes) and manifest.sig.

    Good luck signing the PRGs and manifest yourself unless you can take control of the export process somehow. I'm guessing Garmin won't help you with that haha