dji-sdk / Mobile-SDK-iOS

DJI Mobile SDK for iOS: http://developer.dji.com/mobile-sdk/
Other
581 stars 255 forks source link

After app relaunch, SDK will not connect to product #219

Open charlieMonroe opened 6 years ago

charlieMonroe commented 6 years ago

When you manually quit the app on iOS (by double-clicking the home button and swiping up), or if it crashes, occasionally, the SDK fails to connect to the product. The app first registers with the SDK (successfully) and calls DJISDKManager.startConnectionToProduct() - which returns true, but the delegate method func productConnected(_ product: DJIBaseProduct?) never gets called.

The only solution is to unplug and re-plug the cable connecting the remote controller and the iPhone. After that I can see some logs from External Accessory framework and the device immediately connects. Is this a known issue?

DJI Phantom 4 Pro (Dec 25 firmware), remote controller up-to-date iPhone 6 Xcode 9.2, iOS 11.2.5

XietongLU commented 6 years ago

Yes. It is a known issue of iOS 11. We are talking to Apple to resolve this issue.

charlieMonroe commented 6 years ago

Thanks for the quick confirmation!

Nitaym commented 6 years ago

From iOS 11.2.6 release notes:

Fixes an issue where some third-party apps could fail to connect to external accessories

Did that fix the issue?

https://support.apple.com/en-us/HT208067

charlieMonroe commented 6 years ago

11.2.6 might have improved this, but hasn't fixed it completely - we're still able to reproduce this.

XietongLU commented 6 years ago

Confirmed with Apple, it is not fixed yet. We also found that the latest beta version of iOS may alleviate this issue.