This class is the entry point for using the SDK with a DJI product. Most importantly, this class is used to register the SDK, and to connect to and access the product. This class also provides access to important feature managers (such as keyManager), debugging tools, and threading control of asynchronous completion blocks. SDK Registration using registerAppWithDelegate must be successful before the SDK can be used with a DJI product.
The first time the app is initialized after installation, the app connects to a DJI Server through the internet to verify the Application Key. The request will include the following information:
- App key - Bundle ID - Device UUID generated from hashed mobile device ID (getDeviceID), hashed SIM serial number (getSIMSerialNumber) and hashed ANDROID ID (Secure.ANDROID_ID). If READ_PHONE_STATE permission is not permitted, a random UUID is generated. - System platform, version and name - UUID generated by platform's API ([UIDevice) - Mobile device model - Internet related feature initialisation. Subsequent app starts will use locally cached verification information to register the app when the cached information is still valid.
Designed for LDM feature DJILDMManager. The first time the app is initialized after installation, the app connects to a DJI Server through the internet to verify the Application Key. The request will include the following information:
- App key - Bundle ID - Device UUID generated from hashed mobile device ID (getDeviceID), hashed SIM serial number (getSIMSerialNumber) and hashed ANDROID ID (Secure.ANDROID_ID). If READ_PHONE_STATE permission is not permitted, a random UUID is generated. - System platform, version and name - UUID generated by platform's API ([UIDevice) - Mobile device model - Internet related feature initialisation (not included) After successfully registered, the app will enter LDM mode. Subsequent app starts will use locally cached verification information to register the app when the cached information is still valid.
The first time the app is initialized after installation, the app connects to a DJI Server through the internet to verify the Application Key. The request will include the following information:
- App key - Bundle ID - Device UUID generated from hashed mobile device ID (getDeviceID), hashed SIM serial number (getSIMSerialNumber) and hased ANDROID ID (Secure.ANDROID_ID). If READ_PHONE_STATE permission is not permitted, a random UUID is generated. - System platform, version and name - UUID generated by platform's API ([UIDevice) - Mobile device model Subsequent app starts will use locally cached verification information to register the app when the cached information is still valid. Use this method if using startListeningOnRegistrationUpdatesWithListener:andUpdateBlock to listen for registration status.
Register a listener for SDK app registration status updates. Unlike registerAppWithDelegate this method allows registration updates to go to multiple entities in your app in lieu of a single delegate object.
Register a listener for product connection status updates. Unlike registerAppWithDelegate this method allows product connection updates to go to multiple entities in your app in lieu of a single delegate object.
Input Parameters:
id listener
Listener that is responsible for product connection updates.
Register a listener for component connection status updates. Unlike registerAppWithDelegate this method allows product connection updates to go to multiple entities in your app in lieu of a single delegate object.
Input Parameters:
id listener
Listener that is responsible for component connection updates.
Used to establish the Bluetooth connection between the mobile device and the DJI product. The Bluetooth connection needs to be established before a connection between the SDK and the DJI product can be made using startConnectionToProduct.
Starts a connection between the SDK and the DJI product. This method should be called after successful registration of the app and once there is a data connection between the mobile device and DJI product. This data connection is either a USB cable connection, a WiFi connection (that needs to be established outside of the SDK) or a Bluetooth connection (that needs to be established with bluetoothProductConnector). If the connection succeeds, productConnected will be called if the connection succeeded. Returns YES if the connection is started successfully. For products which connect to the mobile device using Bluetooth, bluetoothProductConnector should be used to get a DJIBluetoothProductConnector object which can handle Bluetooth device connection.
Set the SDK to close the connection automatically when the app enters the background, and resume connection automatically when the app enters the foreground. Default is YES.
Input Parameters:
BOOL isClose
YES if the connection should be closed when entering background.
Enter debug mode with debug IP. Please download and use the latest DJI SDK Bridge app from App Store: https://itunes.apple.com/us/app/sdk-bridge/id1263583917?ls=1&mt=8
Enables the debug log system. It will enable the DJI Mobile SDK to collect logs that are related to the sdk's internal logic. These logs can be used to help diagnose SDK bugs. The storage limit is 100 MB. When the limit is met, SDK will remove the older half of the logs. By default, the debug log system is disabled. The developer should call this method in each life cycle of the application to enable the debug log system. The logs will be saved to directory named DJISDKDebugLogs. The logs can be accessed through iTunes. In order to improve developer's experience on SDK interconnectivity, DJIPipeline is designed to save log files locally when files are transferred, during which the speed is 475KB per minute. Please be careful with the device storage.
Gets the path that flight logs are stored to. Flight logs are automatically defineed by MSDK and stored on the mobile device. The SDK does nothing with these logs, and they are provided only as a convenience for developers and users. Users can use these flight logs with DJI service centers if they are making a warranty claim. Only developers using the SDK, and users of the mobile device can access these logs. Older flight logs are overwritten by newer flight logs over time, so the flight log path is given in case an application needs to store all logs.
Sets the desired accuracy for the internal location manager to lower the power usage. The default desired accuracy is "kCLLocationAccuracyBestForNavigation".
Manages Local Data Mode (LDM) functionality. Local data mode gives the developer the option to put the SDK into airplane mode, restricting its access to the internet. See DJILDMManager for details on when and where this is possible, and what is restricted.
Manages flight information to report to UTMISS (Unmanned Aircraft System Traffic Management Information Service System). This can be used only in China.
Called when Fly Safe database download progress is updated. Mobile SDK will download the database when registerAppWithDelegate is invoked. Please integrate the "DJIFlySafeDatabaseResource" bundle to the Xcode project by using Cocoapods (https://cocoapods.org/pods/DJIFlySafeDatabaseResource). Check appRegisteredWithError for updated errors.