Forced to build with SDK 8.1.0?! Compatibility issues?

I was building with SDK 7.4.3. just fine, including building for the Fenix 8.

But than I opened the SDK manager and it started updating everything, devices and SDKS.

Without changing anything all of a sudden my builds are not working anymore: 

java -Xms1g -Dfile.encoding=UTF-8 -Dapple.awt.UIElement=true -jar c:\Users\michael\AppData\Roaming\Garmin\ConnectIQ\Sdks\connectiq-sdk-win-7.4.3-2024-12-11-90ec25e45\bin\monkeybrains.jar -o c:\Users\michael\Desktop\GarminTesting.prg -f c:\Users\michael\Documents\GitHub\GarminTesting\monkey.jungle -y c:\Users\michael\Documents\GitHub\GarminTesting\developer_key -d fenix8solar51mm -w

-> Now results in 

"ERROR: Device 'fenix8solar51mm' requires API Level '5.1.0'. The current SDK supports up to API Level '5.0.1'. Try updating your SDK using the Connect IQ SDK Manager."

Before the SDK (manager) updates it was working fine, including building for Fenix 8. Now all of a sudden it seems Fenix 9 requires API level 5.1.0 which requires SDK 8.1.0. The only way I get it working again is when i set 8.1.0 as my current SDK. But this SDK is only 1 month old. I always lived in the assumption to built with oldest SDK possible, so make sure that the app can be installed on devices that didnt have recent firmware updates. If I now built with 8.1.0 and release to the Connect IQ store, what are the risks? Could it be that many people can't install/update the app yet?

And how can an update of the SDK / SDK manager break my built? 

  • I would like to reduce the problem to a simple question:
    A data field is now on store for Edge 1030 up to Edge 1050 (build with 7.4.3).
    What does it mean for Edge 1030 when the datafield was rebuild now with 8.1.0?
    (An Edge 1030 will never get CIQ 5.1.)

    To answer your question as simply as possible, building with a different SDK version has no impact on Edge 1030 (or any other device), regarding compatibility with a real device, as long as the SDK supports the device. What does make a difference is the contents of the device file when the app was built [i.e. the firmwareVersion in connectiq/devices/edge1030/compiler.json, on your dev computer]. If the device file is updated with a newer firmwareVersion, users will be unable to download your app unless their device has that version [or higher], regardless of which SDK you use to build the app.

    In other words, the CIQ store checks device firmware compatibility for your app based on the metadata from the device file [compiler.json] when the app's IQ file was built, NOT based on the version of the SDK that was used to build the app.


    More details:

    Again, as far as device compatibility goes, it does *not* matter what SDK version was used to build the app (from the POV of the end user), as long as the SDK supports the device in question. (This is a separate concern from the fact that the dev may have been *forced* to build with a certain SDK version)

    What matters is the contents of the Edge 1030 device config file on your dev computer (specifically, connectiq/devices/edge1030/compiler.json). edge1030/compiler.json contains a list of part numbers, each of which has values for connectIqVersion and firmwareVersion. When you export a project with support for edge1030, those values are written to the manifest file in the exported IQ package.

    When an Edge 1030 user tries to install/update your app, their firmware version must be greater or equal to the value of firmwareVersion that was written to the IQ file, for their specific part number. If not, the store will tell them they need to upgrade.

    For example, edge1030/compiler.json lists two part numbers - the 1st one is WW (worldwide) and the 2nd is one is APAC (asia-pacific).

    The 1st part number has connectIqVersion == "3.3.1" and firmwareVersion == 1340 (13.40).

    The 2nd part number has connectIqVersion == "3.2.5" and firmwareVersion == 1230 (12.30).

    Regardless of the SDK used to build your app:

    - Users of the WW variant of edge1030 will be required to have at least firmware version 13.40 to install/update your app, which guarantees that CIQ API level 3.3.1 (or higher) will be present. If your manifest.xml specifies minApiLevel > 3.3.1, then this part number will be excluded from the IQ file

    - Users of the APAC variant of edge1030 will be required to have at least firmware version 12.30 to install/update your app, which guarantees CIQ 3.2.5 (or higher) will be present. If your manifest.xml specifies minApiLevel > 3.2.5, then this part number will be excluded from the IQ file

    With regards to SDK versions, only SDKs that support CIQ 3.2.5/3.3.5 should be used to build the app for edge1030. Of course, SDK 8.1.0 supports those versions, it's fine to use that SDK for edge1030.

  • To say all of that as simply as possible: it's the device files (compiler.json for each device) that matter, not the SDK version, regarding device/firmware compatibility for your app, when the user tries to install it from the store.

    For a given device, compiler.json determines:

    - which SDKs can be used to build for the device

    - the minimum device firmware that's required to install a newly-built app [*] [the min firmware version implies a guaranteed min CIQ version, of course]

    That's why updates to device files (specifically, compiler.json) can require either a new SDK to build for the device and/or new firmware to install a newly-built app on the real device, for each device that was updated.

    [*] the relevant version information from compiler.json is written to the IQ file at export time


    To break it down as simply as I can:

    1) You as a dev specify the devices you want to support in manifest.xml (e.g. fr955, edge1030, enduro3, etc.)

    2) You specify the minApiLevel (min CIQ version) in manifest.xml. 

    3) each device file - connectiq/devices/[device id]/compiler.json - contains connectIqVersion and firmwareVersion for each "part number". Part numbers correspond to variants within the same "CIQ device" (e.g. fr935 has WW and APAC variants; fenix7x has Fenix and Tactix variants). For each part number, connectIqVersion and firmwareVersion are written to the manifest in the IQ file that's created when the app is exported. (Of course, the IQ file is what devs submit to the store when uploading a new app version.)

    4) At build time (build current project / build for device) the SDK checks connectIqVersion for the main part number of the given device. If the SDK does not support connectIqVersion, it refuses to build for that device. This is the mechanism by which devs are forced to use SDK 8.1.0 to build for CIQ 5.1.0 devices, for example.

    You can see which CIQ versions an SDK supports by opening SDK_ROOT/bin/compilerinfo.xml and looking at the badly-named targetSdkVersions list.

    5a) At export time, the compiler uses minApiLevel to exclude devices/part numbers which do not have connectIqVersion greater or equal to minApiLevel. This means that these devices/part numbers will *never* be supported by that build of your app, even if they are later updated to have the required CIQ version. To take advantage of any future updates to the device files, you would have to rebuild your app.

    5b) At export time, if languages are specified in manifest.xml, then they will also be used to exclude part numbers. (e.g. if a device has ww and apac part numbers, and you specify French or some other language not supported by the APAC part number, then the APAC part number will be excluded.)

    6) In the Connect IQ store, when a user tries to install your app (assuming their device/part number was supported at export time), the store will check their device's actual firmware version against the firmwareVersion from compiler.json that was written to the IQ file. If the user's firmware version is less than the firmwareVersion from compiler.json, then the store will refuse to install the app and ask the user to update their firmware.

    Because of point 6), devs find that when their device files (including compiler.json) are updated, sometimes new builds of their app cannot be installed unless the user updates their firmware. This is not because the dev built with a newer SDK (although the dev may have also been required to use a newer SDK because device files were updated.)

  • I would like to reduce the problem to a simple question:
    A data field is now on store for Edge 1030 up to Edge 1050 (build with 7.4.3).
    What does it mean for Edge 1030 when the datafield was rebuild now with 8.1.0?
    (An Edge 1030 will never get CIQ 5.1.)

    To answer even more simply: it doesn't mean anything. (Except that your app receives any new optimizations, changes in behaviour, bug fixes, and bugs that come with SDK 8.1.0)

  • Sorry if I'm being a pain...
    Do I understand that correctly?
    A data field, also for older Edge models, with SDK 8.1.0 rebuild
    -runs on an Edge 1030 with its final CIQ Vers. 3.3.6
    -does not run on an Edge 1050 with old/outdated CIQ Vers. 5.0

  • I don't know the answer, but I know you haven't read or understood what FlowState explained. You're asking the wrong question. The question you could ask for example:

    I updated the device files today in SDK manager. If I make a build now what minimal version the users' 1050 will need to have?

    And the answer is in the compiler.json or simulator.json. But every time there's an update to any device I re run my scripts and upload the updated CSV files. For example: https://github.com/flocsy/garmin-dev-tools/blob/main/csv/device2max-version.csv

  • Ok, thank you all for your patience Thumbsup

  • Do I understand that correctly?
    A data field, also for older Edge models, with SDK 8.1.0 rebuild
    -runs on an Edge 1030 with its final CIQ Vers. 3.3.6
    -does not run on an Edge 1050 with old/outdated CIQ Vers. 5.0

    It has nothing to do with the SDK version that was used to build the app, it has to do with the contents of the device files at the time of the build.

    The specific file of interest for each device is: ConnectIQ/devices/[device id]/compiler.json

    The device files (and the contents of the manifest in the IQ file) will have your answer. If you keep the IQ file for old releases, you will always be able to go back, unzip the IQ and look at the manifest to see connectIqVersion and firmwareVersion for each part number.


    Edge 1030 (as I already said):

    edge1030/compiler.json lists two part numbers - the 1st one is WW (worldwide) and the 2nd is one is APAC (asia-pacific).

    - The 1st part number (006-B2713-00) has connectIqVersion == "3.3.1" and firmwareVersion == 1340 (13.40). You can tell this is WW bc it's first, and it supports non-English European languages but not Asian languages [*]

    Anyone with the WW Edge 1030 part number requires at least firmware 13.40 (with CIQ 3.3.1) to install an app you build today

    - The 2nd part number (006-B2924-00) has connectIqVersion == "3.2.5" and firmwareVersion == 1230 (12.30). You can tell this is APAC bc it's not first, and it supports Asian languages but not non-English European languages [*]

    Anyone with the APAC Edge 1030 part number requires at least firmware 12.30 (with CIQ 3.2.5) to install an app you build today


    Edge 1050:

    edge1050/compiler.json has one part number (newer devices support WW and APAC with a single firmware, without the need for separate part numbers.

    - connectIqVersion is "5.1.0" and firmwareVersion is 1217 (12.17)

    Anyone with Edge 1050 requires at least firmware 12.17 (with CIQ 5.1.0) to install an app you build today

    [1/3]

  • Notes:

    - I said nothing about which SDK version was used to build the app, because it doesn't matter for the question of "can my device install this app?" Yes, you may be forced to use a certain SDK to build a certain device, but that's not the direct reason that a user would be forced to update firmware, the reason is due to the device file (compiler.json)

    - I am of course only guessing that the store checks the firmware version alone and not the CIQ version, but I think this is a reasonable assumption to make. You could even test it yourself, with a beta app of your own, by changing only firmwareVersion in compiler.json for your own device. e.g. If I can install apps on my fr955 today [with firmware 22.24), I could test my theory by changing fr955/compiler.json's firmwareVersion to 22.25, building and uploading a beta app, and seeing if the store now prevents me from installing the app and asks me to update firmware.

    [2/3]

  • I am of course only guessing that the store checks the firmware version alone and not the CIQ version, but I think this is a reasonable assumption to make

    The reason I make that assumption is that considering the CIQ team sets both connectIqVersion and firmwareVersion in compiler.json to "correct values" (i.e. they know the ciq version matches the firmware version they set), there is no reason to check both versions when the user presses "Install" in the store.

    And ofc users don't "update CIQ" on their device, they update their device's firmware. It just so happens new firmware sometimes comes with new a CIQ version.

    EDIT: The final reason I make that assumption is that manifest.xml in the exported IQ file has two keys for each part number:

    - connectIqVersion [same as connectIqVersion in compiler.json]

    and

    - minFirmwareVersion [same as firmwareVersion in compiler.json]

    The fact that firmwareVersion was renamed to minFirmwareVersion but connectIqVersion's name stayed the same suggests that it's only minFirmwareVersion which is used to for the minimum version check.

    [*] the other way to distinguish part numbers, especially when it's not WW vs APAC but it's something like like Fenix vs Tactix, is to look at the devicetypes json request that's used by the CIQ store's Compatible Devices tab: [https://apps.garmin.com/api/appsLibraryExternalServices/api/asw/deviceTypes]

    [3/3]

  • Thank you so much for the elaborate answering. Very insightful. I get it (I think). The update of the device profiles (compiler.json) caused the fact that I had to bump SDK and this device profile now implicates to which devices my app will install. Since I was forced to update (since I had auto-updates enabled in my SDK manager - disabled now), I have no way of getting back as I don't have my old compiler.jsons somewhere available. But now my big question: Can I assume that if I launch my app with this updated compiler json device profiles, that a firmware update will be available for the users also? Because if that is the case than it's OK (not ideal, but ok). But my horror scenario is that I launch my update to CIQ store, and users come back reporting that there is no Firmware update available (despite me being able to built /export for that device). Is this a valid concern? Or can I trust this won't happen?