iOS CIQ SDK Setup

This took me forever to figure out, so I figured that I'd share.

In order to successfully add the CIQ iOS SDK to your project (to create a companion app), you need to do the following:

  • Drag ConnectIQ.framework in to the "Embedded Binaries" list in <Target App> -> General
  • In <Target App> -> Info -> URL Types add a new URL scheme where
    • "Identifier" is your bundle name (e.g. com.whatever.appname)
    • "URL Schemes" is whatever you choose (passed to ConnectIQ on initialization)
    • "Role" is "None"
  • In Info.plist add the following (grants permission to your app to open the Garmin Connect app URL)

<key>LSApplicationQueriesSchemes</key>
<array>
<string>gcm-ciq</string>
</array>

  • In Info.plist, if there is no definition for CFBundleDisplayName (which is the default for Xcode Single App View projects), add the following definition

<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>

Without this, the URL that the ConnectIQ iOS Framework generates is missing a parameter, and it won't open a return URL to your app (failing silently).

Then check out these example apps on github to see how to use the SDK:

https://github.com/dougw/Garmin-ExampleApp-Swift.git

https://github.com/clawoo/gexporter-ios.git

Hope this saves someone else some time, as far as I can tell most of these steps aren't documented anywhere. :(

  • Whoops, should have posted this as a discussion instead of a question ...

  • And posting in the CIQ developer forum would also help:

    https://forums.garmin.com/developer/connect-iq/

  • Figured out how to change it to a discussion, and move it the Connect IQ forums. Thanks!

  • Former Member
    Former Member over 6 years ago

    - I've got a ticket made to update some documentation for the mobile sdk. We have some work on the mobile sdk both iOS and Android that we're trying to get scheduled.

  • It appears that most of this is already covered in connectiq-mobile-sdk-ios-1.3/documentation/ConnectIQ_iOS_SDK.html.

  • Former Member
    Former Member over 5 years ago in reply to Former Member

    Former Member Hello, any update on that matter? the code date for Connect IQ iOS SDK is 2014 more than 5 years until now is quite surprising. I'm looking to find documentation on best practiques for companion APP and it seems that nobody has any idea. Including the solution for Apple Store submission problems regarding Garmin framework. Please could you clarify if the actual workaround includes an actual Swift version for Connect IQ iOS SDK with the corresponding sample code and documentation including the proper method (including the missing stripSimulatorSlice.sh script stated in the documentation but missing in the SDK package or better solution) for submission to Apple Store. Please excuse me for being so direct, but it is surprising to me to see the lack of information in this regard and to contrast that the development for Garmin is quite lacking in support from Garmin, I am not talking about the forum and your availability to help, I am talking about the resources that Garmin puts at the disposal of the developer community. Best

  • Former Member
    Former Member over 5 years ago in reply to Former Member

    Some of the actual feature work that we are talking about here won't end up happening until some other projects wrap up. However, we do have some documentation improvements based on your feedback and a link the missing script that we are putting in place to make what we have more friendly.

  • Former Member
    Former Member over 5 years ago in reply to Former Member

    Hello Former Member Any update on that matter? Would be great if we can have an aprox. date and some more info about the improvements going on you pointed. Also the relation or support to the new Garmin Watches announced.

  • Former Member
    Former Member over 5 years ago

    You da man!  As some ConnectIQ folks noted, the doc in the SDK (circa 2016) does include some of your steps.  You should get a prize.  ;}