DJI SDK Sample Not Working
3419 11 2020-8-2
Uploading and Loding Picture ...(0/1)
o(^-^)o
djiuser_D0sgAm6xL5jn
Second Officer
Flight distance : 379639 ft
United States
Offline

Hello Everyone!

I am having trouble with actually running the sample code on Xcode DJI has provided (iOS). I tried using the Mobile SDK Sample Code (from this site just to make sure we're on the same page: https://github.com/dji-sdk/Mobile-SDK-iOS/tree/master/Sample%20Code) and the Mobile UX SDK Sample Code (https://github.com/dji-sdk/Mobile-SDK-iOS/tree/master/Sample%20Code). For the Mobile SDK Sample Code, I am getting a SIGABRT error (screenshots on the bottom) that I don't really know how to solve. Are the rest of you all getting this error? If so, how do I solve it? In addition, for the Mobile UX SDK Sample Code, I can run it just fine, but when the app opens up, I don't know what to actually do. I can't log in, and I don't really know how to get the FPV view on my drone. Can someone also help me with this? By the way, I am also using an iPhone 6s, if that is a factor I have to take into account.
Screen Shot 2020-08-02 at 9.18.40 PM.png
Screen Shot 2020-08-02 at 9.18.52 PM.png

Mobile UX SDK

Mobile UX SDK

Mobile SDK Sample Code SIGABRT error

Mobile SDK Sample Code SIGABRT error

Mobile SDK Sample Code SIGABRT error

Mobile SDK Sample Code SIGABRT error
IMG_4168.PNG
2020-8-2
Use props
djiuser_D0sgAm6xL5jn
Second Officer
Flight distance : 379639 ft
United States
Offline

I don't why the pictures repeat, sorry if it is too annoying.
2020-8-2
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

djiuser_D0sgAm6xL5jn Posted at 8-2 19:25
I don't why the pictures repeat, sorry if it is too annoying.

Not annoying but good to know it is an accident, otherwise I would be trying to figure why there are two!  
2020-8-3
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

Have you connected your mobile device to an RC and Drone?  If so, how and which drone?
2020-8-3
Use props
djiuser_D0sgAm6xL5jn
Second Officer
Flight distance : 379639 ft
United States
Offline

DJI_Lisa Posted at 8-3 11:47
Have you connected your mobile device to an RC and Drone?  If so, how and which drone?

For the Mobile SDK, I connected my phone to my mac. While running the SDK, it would give me the SIGABRT error so the app would never load. For the UX SDK sample, when I would connect my remote control to the phone, the Connected text would say Yes (connected). However, I do not know what to do after that. I have a Mavic Mini.
2020-8-3
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

I have run both the Objective-C and Swift MSDK sample app without any issue.  Can you tell me what Xcode version you are using?  Did you make any changes at all?  Sometimes this error pops up when there is a a disconnected outlet.  If you keep getting this error, I would clone a fresh version and start again

As for the UX SDK sample app - after you are connected to the Mavic Mini just scroll down and open the various panels like "Default Layout" or "Widgets"
2020-8-7
Use props
djiuser_D0sgAm6xL5jn
Second Officer
Flight distance : 379639 ft
United States
Offline

DJI_Lisa Posted at 8-7 12:21
I have run both the Objective-C and Swift MSDK sample app without any issue.  Can you tell me what Xcode version you are using?  Did you make any changes at all?  Sometimes this error pops up when there is a a disconnected outlet.  If you keep getting this error, I would clone a fresh version and start again

As for the UX SDK sample app - after you are connected to the Mavic Mini just scroll down and open the various panels like "Default Layout" or "Widgets"

I have the most recent version for Xcode and I didn't make any changes. I will try cloning a fresh version and starting again.
2020-8-8
Use props
DJI_Lisa
lvl.4
Hong Kong
Offline

Please let us know how this works for you
2020-8-10
Use props
djiuser_D0sgAm6xL5jn
Second Officer
Flight distance : 379639 ft
United States
Offline

I tried it again after a while. The swift SDK still did not work but the Objective-C code did. I don't know what is wrong with the swift version, but at least the Objective-C sample app worked.

2020-8-12
Use props
2afer
lvl.2
Turkey
Offline

I had a similar problem. Then I noticed that it states the reason for crash is the lack of Bluetooth permission. Add "Privacy - Bluetooth Always Usage Description" to your info.plist and try that again.
2020-8-20
Use props
fans822051b2
lvl.1
Flight distance : 438107 ft
United States
Offline

I'm getting the exact same error when trying to compile a program with the UX SDK.  

Specifically, the lldb output shows the following:
dyld: Library not loaded: @rpath/DJIWidget.framework/DJIWidget
/Users/../Library/Developer/CoreSimulator/Devices/.../data/Containers/Bundle/Application.../....app/Frameworks/DJIUXSDK.framework/DJIUXSDK
  Reason: image not found

Looking through the tutorials is not giving me any obvious steps to resolve the issue, and I can't see where I've missed a step.  Reading forum posts on stackexchange hints that the DJIUXSDK binary needs to be included in the build, but the only screenshots or instructions I can find on the subject refer to xcode versions 10 or older.  I'm using 12.5 (the current version).

Any suggestions?
2021-5-4
Use props
fans822051b2
lvl.1
Flight distance : 438107 ft
United States
Offline

fans822051b2 Posted at 5-4 14:14
I'm getting the exact same error when trying to compile a program with the UX SDK.  

Specifically, the lldb output shows the following:

I figured out my issue.  In my Podfile, I failed to include the line "use_frameworks!".  Inserting this resolved the issue.  

I hope this helps someone.
2021-5-4
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules