I'm trying to connect to my custom CIQ app using mobile iOS SDK. I've followed an example provided by SDK, converted calls to Swift, registered a custom scheme, set permissions, and everything looks fine.
Now I need to get a list of devices and for this I use
ConnectIQ.sharedInstance()?.showDeviceSelection()
That opens GCM as expected, but I have problems with following this part of the instruction:
"Once the user has selected which of the paired devices to share with the companion app, GCM will launch the companion app (via its registered URL scheme)"
- There is no any device selection dialog at this point. It simply opens GCM's last state (whenever it was left before)
- Whatever I do (e.g. clicking on connected or disconnected device) application function with openUrl param is never called
func application(_ app: UIApplication, open url: URL, options: [UIApplication.OpenURLOptionsKey : Any] = [:]) -> Bool {
print("Received URL: \(url)")
... process URL
}
Note also that Garmin iOS documentation suggests to override this function
func application (_ app: UIApplication, open url: URL, source application: String?, _ annotation: Any) -> Bool {
return false
}
But that is deprecated and the first one must be used in iOS 14.1
How can I make openURL working?
In Android there is getKnownDevices function that works very well. Why don't we have anything like that in iOS SDK?