SDK version vs connect iq API version ?

Hello + apology for this stupid question - but I am a bit confused:

as per

https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/new-connect-iq-for-you-in-system-6-2 

the SDK and the Connect IQ API are 2 different things, which I find confusing, since I thought they were the same (as in 'Connect-IQ SDK API version X', just like 'Java SDK version X') ,

which apparently is not the case; but then - following that - and assuming that the API I have been using in my watchfaces has been that if the Connect-IQ rather than the (apparently different thing called) SDK, my next question is what is the SDK used for ?

And while on the topic of confusion - what is this thing with the so-called 'system', e.g. 'system 7' mention here: https://forums.garmin.com/developer/connect-iq/b/news-announcements/posts/welcome-to-system-7

I.e. are 'System' and 'SDK' and 'Connect IQ API' all different things/software ? e.g. given the following statement from the system-7-news link above:

The has operator allows you to check if a symbol exists in a class or module. In the past, this compiled as a runtime check, but it will now be evaluated at the compile time in the System 7 SDK when possible. This allows the optimizer to eliminate the branch and unnecessary code, as well.

how do I know what 'system' a given device X (e.g. Fenix 7/Epix2/etc) has/is planned to get so i could tell if it would benefit from that improvement/optimization ?

Top Replies

All Replies

  • I.e. are 'System' and 'SDK' and 'Connect IQ API' all different things/software ? e.g. given the following statement from the system-7-news link above:

    It's just two things.

    "Connect IQ API" is what the devices support (software running on the device). Soon to be 5.x.x).

    "SDK" is the software used to develop IQ programs (software running on your PC). Soon to be 7.x.x (AKA "System 7).

    Put another way, SDK 7.x.x provides access to the "Connect IQ API" 5.x.x.

    how do I know what 'system' a given device X (e.g. Fenix 7/Epix2/etc) has/is planned to get so i could tell if it would benefit from that improvement/optimization ?

    This is a feature of the software running on your PC (the SDK; AKA "System 7"). It's describing how the device code is being created. That is, all the devices will see the result.

  • As dpawlyk said, each version of the SDK gives you access to features in a given CIQ API level. Some devices may require a certain minimum SDK version, as well. If you always use the latest SDK version, you will be able to build for all devices (regardless of the API level on the device.)

    In the past, API levels and SDK versions were aligned in the sense that if you wanted CIQ API Level 4.2.6 features (for example), you needed CIQ SDK 4.2.6 (*). But CIQ SDK 4.2.6 is able to build software that runs on all devices with API level <= 4.2.6.

    (* I am glossing over the fact that 3.X devices are still receiving new firmware versions, with new CIQ API levels in the 3.X "track", which means that the CIQ 4.0.1 SDK, for example, doesn't support CIQ API Level 3.3 features. See explanation of System levels below.)

    Now it seems that they are aligning the CIQ SDK version number with the System level.

    It's still the case going forward that if you want features available with a certain API level (or to build for a device whose support starts at a given API level), you will need a certain version of the CIQ SDK. It's just that the SDK version no longer aligns with the API level version.

    I.e. are 'System' and 'SDK' and 'Connect IQ API' all different things/software ? e.g. given the following statement from the system-7-news link above:

    The has operator allows you to check if a symbol exists in a class or module. In the past, this compiled as a runtime check, but it will now be evaluated at the compile time in the System 7 SDK when possible. This allows the optimizer to eliminate the branch and unnecessary code, as well.

    how do I know what 'system' a given device X (e.g. Fenix 7/Epix2/etc) has/is planned to get so i could tell if it would benefit from that improvement/optimization ?

    TL;DR Garmin has indicated that most or all of the current CIQ API Level 4.2.x devices will receive CIQ 5, which corresponds to System 7.

    https://forums.garmin.com/developer/connect-iq/f/discussion/355006/system-7-questions/1709480#1709480

    Is there a list of which devices will get System 7 support? Surely VENU 3 and VA5 is on the list right? 

    We'll be updating the announcement with the full list, but it should be all 4.2.x devices . The Venu 3 and Vivoactive 5 will be getting System 7.

    If you're curious, a (not-so-brief) history of CIQ System levels:

    Originally, the System level was a poorly-documented way of "communicating" to devs and users that CIQ API changes had 2 parallel tracks, starting with the introduction of CIQ 4.0.

    Garmin wanted to reserve CIQ 4 for new devices (with significant hardware changes), which meant that CIQ 3 devices would stay on API level 3.X forever. However, they also wanted to implement various wide-ranging changes to both CIQ 3 and CIQ 4. Thus, the CIQ "System" versioning scheme was born.

    - CIQ System 4 means: for CIQ 3 devices, API level 3.2. For CIQ 4 devices, API level 4.0

    - CIQ System 5 means: for CIQ 3 devices, API level 3.3. For CIQ 4 devices, API level 4.1

    - CIQ System 6 means: for CIQ 3 devices, API level 3.4. For CIQ 4 devices, API level 4.2

    I could write a whole blog post about the various problems with the scheme, not the least of which is that most end users and reviewers do not understand it. Other problems:

    - the info in the bullet points I typed above isn't documented anywhere

    - a feature will be listed in the docs as "since API level 3.3" (for example), when they really mean "since System 5".

    - minApiLevel in manifest.xml can't be used to select system levels. e.g. if I wanted to select System 5, I could try to set minApiLevel to 3.3 but that would incorrectly include 4.0. I could set it to 4.1 but that would incorrect exclude 3.3. This is somewhat mitigated by the fact that the CIQ SDK device files are defined (and constantly updated) such that devices are required to have a recent firmware/CIQ version in order for apps built against said device files to be installed at all. (Meaning once CIQ 4.1 was widely available for a device, new apps built against the updated device files would not install at all on a device with the old CIQ 4.0 firmware)

    It's not 100% clear to me, but it seems that CIQ System 7 will only refer to API level 5.0, and many (or all?) existing 4.2 devices will get CIQ 5, which marks a few changes from the previous way of doing things:

    - Existing devices will get a new major CIQ API level version bump (this never happened before)

    - System 7 will only refer to a single "version track"

    - 3.X devices won't be part of System 7. Does this mean they won't get new features going forward? ¯\_(ツ)_/¯ If this is the case, as someone else pointed out, it would've been a great time to align the System level and CIQ API level so that all 3 version could be aligned (SDK, API level and System level.) Or just get rid of the System level concept altogether. But who knows, maybe they will split the firmware into 2 tracks again in the future. Or maybe CIQ 3.X will still get System 7 features, idk.

  • thank you very very much for your patience and kindness and willingness to take the time to clarify this arguably-confusing (to the newbies among us) topic and with such clarity and full details !

    Truly appreciated :)

  • It's very confusing and difficult to know what matches up. Could they not just have also included the SDK version in this list? Compatible Devices | Connect IQ | Garmin Developers

    If someone could tell me what SDK version is compatible with API level 3.3.0 I'd appreciate it. Thanks :)

  • Hi, to be simple, always download the latest SDK, it will always cover all the API..

  • In the API doc, there are two things to look for.

    Since:

    API Level 2.1.0

    Supported Devices:

    [view]

    (this is for  FloorsClimbed" in the ActivityMonitor)

    The first thing to note is it's not available on devices that are running on an device with a CIQ version before 2.1.0 - the forerunner 23x for example.

    But with "View Devices" you'll also see that devices with a higher level of CIQ, up to the latest, might not support this function.  In this case, you'll see it's not supported on the vivoactive5 for example.  The va5 doesn't have a baro altimeter, and can't count floors.

    In general, you want to run the latest SDK (today, 7.3.1), and it will build for any device, with any CIQ level, but you must be careful not to try to use something that's not available on a device you are targeting.  One way to handle this is to use "has" in your code, or you could use jungles.

  • You still want to use the API doc, unless your doc includes things like what API calls are available on each device.  I mentioned ActivityMonitor and floors, but there you also have other things like calls related to wheelchair mode, variations to what's in SensorHistory and even if Toybox.Weather is available (API level isn't enough).  These are just the first ones that came to mind.

  • I will also add to this discussion that the latest devices which run CIQ 5.* require one of the more recent SDKs for apps to build properly. This is a general rule - there may be some specific cases where you can get away with using an older compiler, but I don't want to get into that.

    e.g. fr955, with a connectIQVersion of 5.0.0 in its compiler.json device definition file (*), requires at least SDK 7.1.0.

    (* this means that any app built with that compiler.json file will not install on fr955 unless it's been updated to a version of firmware that supports CIQ 5.0.0)

    fenix8solar47mm (and other fenix8* devices), with a connectIQVersion of 5.0.1, requires at least SDK 7.3.0.

    - Good news: there is a version check built into the compiler which is supposed to prevent old SDKs from building newer devices

    - Bad news: the version check is broken in SDKs 6.*. These SDKs incorrectly think they can build for CIQ 5.* devices. Furthermore, SDKs 7.1.0 and 7.1.1 incorrectly think they can build for CIQ 5.0.1 devices (like Fenix 8), even though those devices actually require SDK 7.3.0.

    - Worse news: Garmin has no plans to fix this issue. (They really can't do anything except re-release all the old SDKs, which they won't).

    This is another reason that it's usually advisable to use the latest SDK to build your project. (Unless you have no plans to support the latest devices.)