DJI Mobile SDK Documentation

      class DJILDMManager

      @interface DJILDMManager : NSObject
      Header:DJILDMManager.h
      Inherits From:NSObject
      Description:

      Local Data Mode (LDM) manager. When Local Data Mode is enabled, the SDK's access to the internet is restricted. You should use registerAppForLDMWithDelegate to register the app. Only application registration (confirming the app key is valid) will be unrestricted. All other SDK services will be restricted. When the SDK's internet access is restricted, all SDK services that require an internet connection will not be available or able to update. For instance, the Fly Zone manager will not be able to update the fly zone data base, retrieve the latest TFRs (temporary flight restrictions) or unlock fly zones. LDM is therefore most appropriate for users that have very stringent data requirements, and are able to accommodate this restricted functionality. *DJILDMManagerSupportedChangedNotification and *DJILDMManagerEnabledChangedNotification can be used to monitor changes in state for availability of LDM support and whether LDM is enabled or not. When Local Data Mode is enabled, the UTMISSManager will not report flight dynamic data to the UTMISS server.

      Class Members:
      Check LDM Support
      property
      property isLDMSupported
      @property (readonly, nonatomic) BOOL isLDMSupported
      Header:DJILDMManager.h
      Description:

      YES if LDM is supported in the current context. The SDK locally uses GPS location and MCC (mobile country code) to determine the country of operation. If LDM is not enabled and the internet is accessible, the IP address is also used to determine the country of operation. The default value is YES after the first installation.

      Check LDM Enabled
      property
      property isLDMEnabled
      @property (readonly, nonatomic) BOOL isLDMEnabled
      Header:DJILDMManager.h
      Description:

      YES if LDM is already enabled.

      Get LDM Supported
      method
      method getIsLDMSupportedWithCompletion
      - (void)getIsLDMSupportedWithCompletion:(void (^_Nonnull)(BOOL isLDMSupported, NSError *_Nullable error))completion
      Header:DJILDMManager.h
      Description:

      Get is LDM Supported.

      Input Parameters:
      BOOL isLDMSupportedCheck is LDM supported.
      NSError *_Nullable errorError retrieving the value.
      void (^_Nonnull)(BOOL isLDMSupported, NSError *_Nullable error) completionCompletion block.
      Enable LDM
      method
      method enableLDMWithCompletion
      - (void)enableLDMWithCompletion:(void (^_Nonnull)(NSError *_Nullable error))completion
      Header:DJILDMManager.h
      Description:

      Enables LDM. Can only be enabled if isLDMSupported is YES. Please call getIsLDMSupportedWithCompletion methods firstly. Call this method before calling the other methods of SDK (including registerAppWithDelegate) to restrict the internet access of SDK (SDK registration is unrestricted).

      Input Parameters:
      NSError *_Nullable errorError retrieving the value.
      void (^_Nonnull)(NSError *_Nullable error) completionCompletion block.
      Disable LDM
      method
      method disableLDM
      - (void)disableLDM
      Header:DJILDMManager.h
      Description:

      Disables LDM.

      Network Service
      method
      method setModuleNetworkServiceEnabled
      - (NSError *_Nullable)setModuleNetworkServiceEnabled:(NSArray<DJILDMModule *> *)modules
      Header:DJILDMManager.h
      Description:

      In LDM mode, You can use this interface to enable network service of the selected module.

      Input Parameters:
      NSArray<DJILDMModule *> * modulesThe array of the modules need to be enabled.
      method isLDMModuleNetworkServiceEnabled
      - (BOOL)isLDMModuleNetworkServiceEnabled:(DJILDMModuleType)moduleType
      Header:DJILDMManager.h
      Description:

      YES if the network service of the module is enabled.

      Input Parameters:
      DJILDMModuleType moduleTypeThe type of module that needs to be checked.
      Return:
      BOOLYES if the network service of the module is enabled.
      extern *DJILDMManagerSupportedChangedNotification
      extern NSString *DJILDMManagerSupportedChangedNotification
      Header:DJILDMManager.h
      Description:

      Notification if LDM support has changed. If LDM support changes from YES to NO, and LDM is enabled, then LDM will be disabled after 2 minutes (120s) if isLDMSupported remains NO.

      extern *DJILDMManagerEnabledChangedNotification
      extern NSString *DJILDMManagerEnabledChangedNotification
      Header:DJILDMManager.h
      Description:

      Notification for when LDM transitions between enabled and disabled (and vise versa).

      extern *DJILDMManagerModuleNetworkServiceChangedNotification
      extern NSString *DJILDMManagerModuleNetworkServiceChangedNotification
      Header:DJILDMManager.h
      Description:

      Notification for when LDM module network services changed. When the notification comes, you could get the network service status with isLDMModuleNetworkServiceEnabled.