Please select Into the mobile phone version | Continue to access the computer ver.
Issues I found in IOS MOBILE SDK v4.14 TRIAL
1929 26 2020-12-11
Uploading and Loding Picture ...(0/1)
o(^-^)o
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

1) Failed to run an app with this SDK version on a mobile device that had an app installed with a previous SDK version. I changed the SDK version in the application several times to be sure. With SDK 4.13, the application started normally, with 4.14 TRIAL gave a critical error and closed.

SDK 4.13 log:
2020-12-11 16:33:20.701494+0300 app name[606:77717] Metal API Validation Enabled
2020-12-11 16:33:21.007889+0300 app name 606:77487] [Client] {"msg":"#NullIsland Either the latitude or longitude was exactly 0! That's highly unlikely", "latIsZero":0, "lonIsZero":0}
2020-12-11 16:33:21.008940+0300 app name 606:77487] [Client] {"msg":"#NullIsland Received a latitude or longitude from getLocationForBundleID that was exactly zero", "latIsZero":0, "lonIsZero":0, "location":{"floor":2147483647,"lifespan":-1,"rawLat":0,"integrity":0,"referenceFrame":"Unknown","lon":0,"speed":-1,"type":"Unknown","altitude":0,"rawCourse":-1,"confidence":0,"suitability":{"type":"decode failure","raw value":57184104,"expected type":"CLClientLocationSuitability"},"timestamp":-1,"rawReferenceFrame":"Unknown","lat":4.9406564584124654e-324,"verticalAccuracy":-1,"rawLon":0,"horizontalAccuracy":-1,"speedAccuracy":-1,"courseAccuracy":-1,"course":-1}}
2020-12-11 16:33:21.037436+0300 app name[606:77487] IAPDHasLaunched: kIAPAvailableNotification iapdAvailableState 0 -> 0
2020-12-11 16:33:21.037655+0300 app name[606:77487] IAP2DHasLaunched: kIAP2AvailableNotification iap2dAvailableState 0 -> 0
2020-12-11 16:33:21.038085+0300 app name[606:77487] -[EAAccessoryManager _initFromSingletonCreationMethod] isRunningOnMac
2020-12-11 16:33:21.061653+0300 app name[606:77487] On: 956 RegisteredForLocalNotifications Count: 1
2020-12-11 16:33:21.111843+0300 app name[606:77487] registerAppSuccess


SDK 4.14 TRIAL log:
2020-12-11 15:52:16.849361+0300 app name [586:70379] Metal API Validation Enabled
2020-12-11 15:52:17.185868+0300 app name 586:70170] [Client] {"msg":"#NullIsland Either the latitude or longitude was exactly 0! That's highly unlikely", "latIsZero":0, "lonIsZero":0}
2020-12-11 15:52:17.186529+0300 app name[586:70170] [Client] {"msg":"#NullIsland Received a latitude or longitude from getLocationForBundleID that was exactly zero", "latIsZero":0, "lonIsZero":0, "location":{"floor":2147483647,"lifespan":-1,"rawLat":0,"integrity":0,"referenceFrame":"Unknown","lon":0,"speed":-1,"type":"Unknown","altitude":0,"rawCourse":-1,"confidence":0,"suitability":{"type":"decode failure","raw value":713756760,"expected type":"CLClientLocationSuitability"},"timestamp":-1,"rawReferenceFrame":"Unknown","lat":4.9406564584124654e-324,"verticalAccuracy":-1,"rawLon":0,"horizontalAccuracy":-1,"speedAccuracy":-1,"courseAccuracy":-1,"course":-1}}
2020-12-11 15:52:17.228076+0300 app name[586:70170] IAPDHasLaunched: kIAPAvailableNotification iapdAvailableState 0 -> 0
2020-12-11 15:52:17.228289+0300 app name[586:70170] IAP2DHasLaunched: kIAP2AvailableNotification iap2dAvailableState 0 -> 0
2020-12-11 15:52:17.228663+0300 app name[586:70170] -[EAAccessoryManager _initFromSingletonCreationMethod] isRunningOnMac
2020-12-11 15:52:17.258242+0300 app name[586:70170] On: 956 RegisteredForLocalNotifications Count: 1
2020-12-11 15:52:17.386193+0300 app name 586:70170] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[_NSPlaceholderData initWithBase64EncodedDataptions:]: nil data argument'
*** First throw call stack:
(0x1928e79d4 0x1a6298b54 0x193b2bef0 0x101020314 0x10079acd4 0x10079a92c 0x1009227a0 0x10079a7a4 0x1002df208 0x193bc1800 0x1928683d0 0x192867fd4 0x1928674b4 0x192861840 0x192860b90 0x1a8b83598 0x19514a638 0x19514fbb8 0x10035fba4 0x19253f588)
libc++abi.dylib: terminating with uncaught exception of type NSException
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[_NSPlaceholderData initWithBase64EncodedDataptions:]: nil data argument'
terminating with uncaught exception of type NSException

Only complete removal of the application with reinstallation helped. That, as you understand, is not an option, since the application stores various necessary information.

2) After connecting the Mavic Air 2 remote control and launching the application, nothing happens, that is, the method

- (void)productConnectedDJIBaseProduct *)product{

}

does not react in any way. The SDK responds normally when connecting a remote control from the Phantom 4 Pro.

3) Maybe I have forgotten how to program or I don’t know something?)
2020-12-11
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

Guys, let's not rush the mobile SDK team. I don’t want to use raw software. They even make mistakes in the SDK manual.

2020-12-11
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

Judging by the error I mentioned earlier, which occurs when launching an application with SDK v4.14 TRIAL1, the situation is as follows:

At the moment, there is an incompatibility between SDK v4.13 and v4.14 TRIAL1.

When installing SDK v4.14 TRIAL1 over v4.13 in the same application, it tries to perform an operation with data of type NSData using the initWithBase64EncodedData: options: method. But these data do not exist. SDK v4.13 did not generate this data. But when installing an application with SDK v4.14 TRIAL1 on a clean mobile device, there are no problems, since it creates the necessary data itself.

Hence the conclusion that the mobile SDK team this time did not test the new version of the SDK in its own test application on a mobile device on which the version of the application with SDK v4.13 was already installed.
2020-12-11
Use props
MitchRSM
Second Officer
Flight distance : 149534 ft
  • >>>
Italy
Online

Experiencing  the same issues , same crash, and can’t connect the Mavic air2 (not even with the sample ObjC code)
2020-12-12
Use props
MitchRSM
Second Officer
Flight distance : 149534 ft
  • >>>
San Marino
Online

using the sdk bridge, it's possible to connect the drone the sdk 4.14 trial1
2020-12-12
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

MitchRSM Posted at 12-12 08:06
using the sdk bridge, it's possible to connect the drone the sdk 4.14 trial1

Did you manage to connect to the Mavic Air 2 using the bridge SDK?
2020-12-12
Use props
MitchRSM
Second Officer
Flight distance : 149534 ft
  • >>>
San Marino
Online

Yes

https://youtu.be/3gD97F3H5Jw
2020-12-12
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

MitchRSM Posted at 12-12 09:34
Yes

https://youtu.be/3gD97F3H5Jw

Thank you! I have never used bridge, I have to work.
2020-12-12
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

MitchRSM Posted at 12-12 09:34
Yes

https://youtu.be/3gD97F3H5Jw

I was able to connect too. Does it work normally for you? I'm not very good. When using the SDK in Xcode 12.2, when the remote control was connected, the componentConnectedWithKey: method began to fire and then immediately componentDisconnectedWithKey :. Very strange behavior.
2020-12-12
Use props
Nikolay L
lvl.2
Flight distance : 1172753 ft
  • >>>
Russia
Offline

The same problem. Decided to test 4.14-trial and the app crashes on "DJISDKManager.registerApp(with: self)" in my root controller. iOS device has an app with SDK 4.13 installed.
If I completely remove an app and reinstall it again, all goes OK.
Of course, as Super pilot mentioned, that is not a good option. My app is published, so posting "Remove and reinstall" on the App Store update notes is not suitable.
2020-12-13
Use props
straule
lvl.3
Flight distance : 29508 ft
  • >>>
Germany
Offline

I can confirm the same issues as reported in the initial post by SuperPilot. Some hints for DJI developers and other fellow developers:

* Direct connection to the Mavic Air 2 with the 4.14 TRIAL SDK simply DOES NOT WORK. Not with my own App, not with the DJISDKSwiftDemo and not with the Objective-C DJISDKDemo. The callback "productConnected" never gets called.
* The newly released DJI SDK Bridge App does connect to the Mavic Air 2. Therefore, if you configure the SDK to bridge mode all three apps above are working. Obviously, this may help for development, but not for developing a real app.
* If an iOS app build with the 4.14 TRIAL SDK is installed over an app build with an earlier SDK (without deleting the app first) the new app crashes in DJISDK with 'NSInvalidArgumentException', reason: '*** -[_NSPlaceholderData initWithBase64EncodedData] as described in initial post. Again a showstopper for building a real app.

Hope issues get fixed soon...
2020-12-13
Use props
DJI-William
lvl.4

South Africa
Offline

Hi folks, please do the change as following images.
98FF575B-2200-C63D-879C-FA9179244CF2.png
EB31BE1C-17F9-BFDD-D114-EC4CDA720F1B.png
2020-12-14
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

DJI-William Posted at 12-14 02:53
Hi folks, please do the change as following images.

Thank you. Added the com.dji.logiclink line and now the application with SDK 4.14 TRIAL1 is installed and works on top of the previous version containing SDK 4.13.

I think that when such critical innovations are added, necessary for normal operation in a development application (Xcode), they need to be loudly announced. For example in iOS_Mobile_SDK_Release_Notes or create a topic on the forum.
2020-12-14
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

DJI-William Posted at 12-14 02:53
Hi folks, please do the change as following images.

Now we will teach the mobile SDK team to program correctly. You can add this code to the SDK, thereby making life much easier for developers.

NSMutableDictionary * userAppPlistErrors_dict = [[NSMutableDictionary alloc]init];
[userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'com.dji.video' line to the 'Supported external accessory protocols' key in the info.plist file" forKey:@"com.dji.video"];
[userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'com.dji.protocol' line to the 'Supported external accessory protocols' key in the info.plist file" forKey:@"com.dji.protocol"];
[userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'com.dji.common' line to the 'Supported external accessory protocols' key in the info.plist file" forKey:@"com.dji.common"];
[userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'com.dji.logiclink' line to the 'Supported external accessory protocols' key in the info.plist file" forKey:@"com.dji.logiclink"];
               
                NSDictionary * userAppInfoDict = [NSBundle mainBundle].infoDictionary;
                if(![userAppInfoDict objectForKey:@"DJISDKAppKey"]){
                    [userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'DJISDKAppKey' key to the info.plist file and specify your application key in the string value." forKey:@"DJISDKAppKey"];
                }
               
                if([userAppInfoDict objectForKey:@"NSAppTransportSecurity"]){
                    NSDictionary * NSAppTransportSecurity_dict = [userAppInfoDict objectForKey:@"NSAppTransportSecurity"];
                    if([NSAppTransportSecurity_dict objectForKey:@"NSAllowsArbitraryLoads"]){
                        if([[NSAppTransportSecurity_dict objectForKey:@"NSAllowsArbitraryLoads"]boolValue] == false){
                            [userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to set the 'Allow Arbitrary Loads' key to true in the info.plist file" forKey:@"Allow Arbitrary Loads"];
                        }
                    }else{
                        [userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'Allow Arbitrary Loads' key in the info.plist file." forKey:@"Allow Arbitrary Loads"];
                    }
                }else{
                    [userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'App Transport Security Settings' key in the info.plist file." forKey:@"App Transport Security Settings"];
                }
               
                if([userAppInfoDict objectForKey:@"UISupportedExternalAccessoryProtocols"]){
                    NSArray * UISupportedExternalAccessoryProtocols_array = [userAppInfoDict objectForKey:@"UISupportedExternalAccessoryProtocols"];
                  for (unsigned long v = 0; v < UISupportedExternalAccessoryProtocols_array.count; v++) {
                        NSString * protokol_str = UISupportedExternalAccessoryProtocols_array[v];
                        if([userAppPlistErrors_dict objectForKey:protokol_str]){
                            [userAppPlistErrors_dict removeObjectForKey:protokol_str];
                        }
                    }
                }else{
                    [userAppPlistErrors_dict setObject:@"Error.To connect to DJI products, you need to add the 'Supported external accessory protocols' key in the info.plist file." forKey:@"Supported external accessory protocols"];
                }
               
                if(userAppPlistErrors_dict.count > 0){
                    [userAppPlistErrors_dict setObject:@"Resolve all indicated issues in your application and visit https://developer.dji.com/mobile ... project-integration" forKey:@"Our recommendations"];
                    NSLog(@"%@",userAppPlistErrors_dict);
                }

2020-12-14
Use props
MitchRSM
Second Officer
Flight distance : 149534 ft
  • >>>
San Marino
Online

DJI-William Posted at 12-14 02:53
Hi folks, please do the change as following images.

thank for the tip
however i still got some  problems when i try to install the app with sdk 4.14-trial1 over a preinstalled a app with sdk 4.13.1

on iphone12 with iOS.14.2 it's work
but if i try the same code (same app update) on any iphone X with iOS 14.0 i strangely still got the same crash:

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[_NSPlaceholderData initWithBase64EncodedData: options:]: nil data argument'




#update
i have clean the build folder and rebuild, now works on all devices
2020-12-14
Use props
djiuser_OR8EW5uz3gSA
Second Officer

Canada
Offline

Can someone from DJI Please advise why this version is called a Trial? Does this mean that this is a beta version of 4.14 and there is another version coming if any new bug fixes are added?
2020-12-14
Use props
DJI-William
lvl.4

South Africa
Offline

There will be a 4.14 official release later, the later official version will contain more bug fix.
2020-12-15
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

DJI-William Posted at 12-15 00:23
There will be a 4.14 official release later, the later official version will contain more bug fix.

Are there so many errors found? It's time to release the TRIAL2 version, it's a matter of five minutes.
2020-12-17
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

DJI-William Posted at 12-15 00:23
There will be a 4.14 official release later, the later official version will contain more bug fix.

When connecting Mavic Air 2, in the method
- (void) flightController: (DJIFlightController * _Nonnull) fc didUpdateIMUState: (DJIIMUState * _Nonnull) imuState
the imuState.accelerometerState value is always DJIIMUSensorStateDisconnected.
2020-12-17
Use props
Leandro31
lvl.4
Flight distance : 371280 ft
Uruguay
Offline

  Do anyone was able to download the picture taken from the camera? When I try to set the camera mode into DJICameraMode.mediaDownload it just fail with:

Optional(Error Domain=DJISDKErrorDomain Code=-1013 "Current product does not support this feature.(code:-1013)"
2020-12-18
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

Leandro31 Posted at 12-18 09:15
Do anyone was able to download the picture taken from the camera? When I try to set the camera mode into DJICameraMode.mediaDownload it just fail with:

Optional(Error Domain=DJISDKErrorDomain Code=-1013 "Current product does not support this feature.(code:-1013)"

I can't change the camera mode at all with the method
- (void) setMode: (DJICameraMode) mode withCompletion: (DJICompletionBlock) completion.
Throws the same error.
2020-12-18
Use props
Leandro31
lvl.4
Flight distance : 371280 ft
Uruguay
Offline

Super pilot Posted at 12-18 09:30
I can't change the camera mode at all with the method
- (void) setMode: (DJICameraMode) mode withCompletion: (DJICompletionBlock) completion.
Throws the same error.

So there isn't any other way to download the images right now?
2020-12-18
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

Leandro31 Posted at 12-18 09:35
So there isn't any other way to download the images right now?

I think yes. You may not expect full functionality from the trial version.
2020-12-18
Use props
DJI-William
lvl.4

South Africa
Offline

Mavic Air 2 needs to use enterPlacyback go to to download mode, same as M300RTK.
2020-12-22
Use props
Super pilot
Second Officer
Flight distance : 174905 ft
Russia
Offline

DJI-William Posted at 12-22 23:11
Mavic Air 2 needs to use enterPlacyback go to to download mode, same as M300RTK.

But what about the fact that methods
- (void) getMode: (DJICameraMode) mode withCompletion: (DJICompletionBlock) completion;
- (void) setMode: (DJICameraMode) mode withCompletion: (DJICompletionBlock) completion;


return an error "Current product does not support this feature"?
2020-12-23
Use props
Leandro31
lvl.4
Flight distance : 371280 ft
Uruguay
Offline

Super pilot Posted at 12-23 07:06
But what about the fact that methods
- (void) getMode: (DJICameraMode) mode withCompletion: (DJICompletionBlock) completion;
- (void) setMode: (DJICameraMode) mode withCompletion: (DJICompletionBlock) completion;

I haven't able to try the playback mode, but do you have the same error when you try to set the camera into playback mode?
2020-12-29
Use props
Leandro31
lvl.4
Flight distance : 371280 ft
Uruguay
Offline

DJI-William Posted at 12-22 23:11
Mavic Air 2 needs to use enterPlacyback go to to download mode, same as M300RTK.

But when we call isMediaDownloadModeSupported() it return true, if they aren't supporting the media download mode it should return false, that confuses a lot.
2020-12-29
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules