dji-sdk / Mobile-SDK-iOS

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

can not get the DJIRemoteController #85

Open lhs71173717 opened 7 years ago

lhs71173717 commented 7 years ago

DJI iOS SDK version 3.5.1 DJI Product Phantom 3 4k iOS system version iOS 10 iOS device iPhone6 plus Xcode version 8.1

SDK register is ok, and i can get camera obj and the flight controller obj ,but i want to get the remoteController, and it return nil. Here is my code:

DJIRemoteController remote = ((DJIAircraft)[DJISDKManager product]).remoteController; if (!remote) { NSLog(@"remote is nil"); }

Is that my DJI product dose not support this api? But I can not get any info in the api doc. And i know that android SDK can get the remote controller obj successes also in its 3.5.1 version.

Waiting for you reply. Thanks very much.

oliverou commented 7 years ago

Hi @lhs71173717, have you tried the iOS SDK Sample Project? You can follow the way of SDK Sample to fetch the DJIRemoteController object.

lhs71173717 commented 7 years ago

Thanks for your reply, I have try the iOS SDK Sample Project, and it return nil also.

d0n13 commented 7 years ago

Your code should be this DJIRemoteController *remote = ((DJIAircraft *)DJISDKManager.product).remoteController; and it doesn't return nil for me...

lhs71173717 commented 7 years ago

@d0n13 Thanks for your reply. I modified the code as you said. But i still get the nil. Can you tell me which product and SDK version you are using?