Can't Get The Live Camera for Mavic 2 Pro
718 3 2020-11-16
Uploading and Loding Picture ...(0/1)
o(^-^)o
Modestos
lvl.2
Israel
Offline

Hi IOS Developers,

I have a problem when I use Mavic 2 Pro in my App.
When I connect the Mavic 2 Pro to The app there is no view for the camera (Black Screen).

In the debugging, I saw that there is an exception when trying to get the bundle from DJIMavic2ProCameraImageCalibrationFilterDataSource.h, I got :

: [color=rgba(0, 0, 0, 0.85)]com.dji.videoPreviewer.decodeThread (45): "*** -[NSBundle initWithURL:]: nil URL argument"
[color=rgba(0, 0, 0, 0.85)]

[color=rgba(0, 0, 0, 0.85)]in line :

NSBundle *bundle = [NSBundle bundleWithURL:[[NSBundle mainBundle] URLForResource:@"DistortionResource" withExtension:@"bundle"]];
[color=rgba(0, 0, 0, 0.850980392156863)]
Does anyone have has a solution?
For P4P, P4 Adv , P4 V2 is working, the problem exists just in Mavic 2 Pro


I'm using :
Xcode 12
DJI SDK 4.13.1

DJIWidget 1.6.3


ScreenShot attached




ScreenShot

ScreenShot
2020-11-16
Use props
MedicFL1
lvl.4
Flight distance : 4358570 ft
  • >>>
United States
Offline

Mine flew fine on 11/13/20 and today 11/15/20 after Go 4 App startup showing good version check  and Go Fly  ...
I then get VERSION Mismatch -  UPDATE ALL MODULES
NO Camera connection at All !!
2020-11-16
Use props
DAFlys
Captain
Flight distance : 312090263 ft
  • >>>
United Kingdom
Offline

Make sure you force quite any other app that has the SDK in it.
2020-11-17
Use props
djiuser_OR8EW5uz3gSA
lvl.4

Canada
Offline

For anyone else who encounters this issue, you also need to add the DistortionResource.bundle resource from the DJI Sample app to your app.

That is the resource this line is trying to grab

NSBundle *bundle = [NSBundle bundleWithURL:[[NSBundle mainBundle] URLForResource:@"DistortionResource" withExtension:@"bundle"]];

Also you could just set calibrateNeeded to false in DecodeImageCalibrateLogic or not init an instance of that class in your VideoPreviewer.

The DistortionResource.bundle resource is 46MB on its own which is a bit excessive
2021-5-10
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules