Integrate SDK Problem
已完成I have downloaded DJI Mobile Sample app, and everything works great. But when it comes to my project, I could not make it work.
I have fallowed the instruction in the link below;
https://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html#configure-build-settings
But I still get the error log below:
2021-11-17 13:47:02.425494+0300 DJIRemote[21072:6276051] IAPAppRegisterClient: capabilities 0x8020
2021-11-17 13:47:02.425586+0300 DJIRemote[21072:6276051] IAPAppRegisterClient: __eaClientRegisterediapd 0 -> 1
2021-11-17 13:47:02.425609+0300 DJIRemote[21072:6276051] IAPAppRegisterClient: __eaClientRegisterediap2d 0 -> 1
2021-11-17 13:47:02.425715+0300 DJIRemote[21072:6276051] IAPDHasLaunched: kIAPAvailableNotification iapdAvailableState 100 -> 0
2021-11-17 13:47:02.425756+0300 DJIRemote[21072:6276051] IAPAppRegisterClient: __eaiapdHasClientID 0, IAPDHasLaunched 0
2021-11-17 13:47:02.426040+0300 DJIRemote[21072:6276051] IAP2DHasLaunched: kIAP2AvailableNotification iap2dAvailableState 100 -> 0
2021-11-17 13:47:02.426086+0300 DJIRemote[21072:6276051] IAPAppRegisterClient: __eaiap2dHasClientID 0, IAP2DHasLaunched 0
2021-11-17 13:47:02.426238+0300 DJIRemote[21072:6276051] IAPAppRegisterClient: registerWasSuccessful 0
2021-11-17 13:47:02.426463+0300 DJIRemote[21072:6276051] -[EAAccessoryManager _initFromSingletonCreationMethod] isRunningOnMac
2021-11-17 13:47:02.428918+0300 DJIRemote[21072:6276051] IAPAppConnectedAccessories: __eaClientHasCheckedForConnectedAccessories 0 -> 1
2021-11-17 13:47:02.429080+0300 DJIRemote[21072:6276051] IAPAppConnectedAccessories: IAPDHasLaunched 0, IAP2DHasLaunched 0
2021-11-17 13:47:02.429521+0300 DJIRemote[21072:6276051] On: 956 RegisteredForLocalNotifications Count: 1
2021-11-17 13:47:02.585490+0300 DJIRemote[21072:6276051] SDK Registered with error
2021-11-17 13:47:02.589684+0300 DJIRemote[21072:6276051] IAPAppConnectedAccessories: __eaClientHasCheckedForConnectedAccessories 1 -> 1
2021-11-17 13:47:02.641049+0300 DJIRemote[21072:6276051] IAPAppConnectedAccessories: IAPDHasLaunched 0, IAP2DHasLaunched 0
2021-11-17 13:47:04.541564+0300 DJIRemote[21072:6276340] [connection] nw_resolver_start_query_timer_block_invoke [C1] Query fired: did not receive all answers in time for app-service.skypixel.com:443
2021-11-17 13:47:04.754594+0300 DJIRemote[21072:6276340] [connection] nw_resolver_start_query_timer_block_invoke [C2] Query fired: did not receive all answers in time for api.dji-services.com:443
2021-11-17 13:47:04.763567+0300 DJIRemote[21072:6276315] [connection] nw_resolver_start_query_timer_block_invoke [C4] Query fired: did not receive all answers in time for app-service.skypixel.com:443
2021-11-17 13:47:04.804055+0300 DJIRemote[21072:6276315] [connection] nw_resolver_start_query_timer_block_invoke [C3] Query fired: did not receive all answers in time for mydjiflight.dji.com:443
2021-11-17 13:47:04.804110+0300 DJIRemote[21072:6276315] [connection] nw_resolver_start_query_timer_block_invoke [C5] Query fired: did not receive all answers in time for mydjiflight.dji.com:443
2021-11-17 13:47:04.822990+0300 DJIRemote[21072:6276314] [connection] nw_resolver_start_query_timer_block_invoke [C7] Query fired: did not receive all answers in time for app-service.skypixel.com:443
2021-11-17 13:47:04.823039+0300 DJIRemote[21072:6276314] [connection] nw_resolver_start_query_timer_block_invoke [C8] Query fired: did not receive all answers in time for mydjiflight.dji.com:443
2021-11-17 13:47:04.873212+0300 DJIRemote[21072:6276340] [connection] nw_resolver_start_query_timer_block_invoke [C9] Query fired: did not receive all answers in time for mydjiflight.dji.com:443
2021-11-17 13:47:05.404391+0300 DJIRemote[21072:6276315] [connection] nw_resolver_start_query_timer_block_invoke [C10] Query fired: did not receive all answers in time for flysafe-api.dji.com:443
-
The log is meaningless to me, the problem is I don't know how you integrate the SDK in. Check this tutorial and its final github demo. But please keep in mind that the tutorial and demo may be old, you need to also refer to the Sample app. The tutorial just give you a overal understanding of intergrating SDK. Link:https://developer.dji.com/mobile-sdk/documentation/application-development-workflow/workflow-integrate.html#implement-app-registration-and-sdk-callbacks -
Ok, what I realized is;
My- (void)appRegisteredWithError:(NSError *_Nullable)error
is called and my app is registered without any error.
When I test the DJI's sample app, as soon as[DJISDKManager registerAppWithDelegate:self];
called, the productConnected function below is also called
-(void) productConnected:(DJIBaseProduct* _Nullable) product
However, my productConnected metod is never called.
Is productConnected func is a delegate function or should I make any settings for this function being called? -
productConnected is the delegate method for you to know if the product has been connected or not. And after the registration, if you don`t use the BridgeApp, you need to call the startConnectionToProduct method, please check below part of the IOS MSDK sample. https://www.github.com/dji-sdk/Mobile-SDK-iOS/blob/master/Sample%20Code/ObjcSampleCode/DJISdkDemo/Startup/DJIRootViewController.m ![](https://djisdksupport.zendesk.com/attachments/token/luxUgn646jLuq1zg3Z9iQr5q3/?name=inline1087799746.png)
请先登录再写评论。
评论
5 条评论