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. :(