DJI Mobile SDK Documentation

      class DJIBaseProduct

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

      Abstract class for all DJI Products. DJIAircraft and DJIHandheld objects are subclasses of DJIBaseProduct and can be accessed from product in DJISDKManager. Additional components can be found in DJIAircraft and DJIHandheld that are unique to those products only.

      Class Members:
      State Updates
      property
      property delegate
      @property (nonatomic, weak) id<DJIBaseProductDelegate> delegate
      Header:DJIBaseProduct.h
      Description:

      Used to notify user of changes in connectivity between the DJI product and the mobile device, changes in components that are part of the product, and diagnostic information from the product.

      See Also:

      DJIBaseProductDelegate

      method getFirmwarePackageVersionWithCompletion
      - (void)getFirmwarePackageVersionWithCompletion:(void (^)(NSString *_Nullable version, NSError *_Nullable error))block
      Header:DJIBaseProduct.h
      Description:

      Gets the product's firmware package version. Products other than Phantom 4, Phantom 4 Pro, Mavic Pro, and Inspire 2, require internet connection. The execution time for this method depends on the speed of internet connectivity.

      Input Parameters:
      NSString *_Nullable versionThe product's firmware package version.
      NSError *_Nullable errorError retrieving the value.
      void (^)(NSString *_Nullable version, NSError *_Nullable error) blockCompletion block to receive the asynchronous result.
      method setName:withCompletion
      - (void)setName:(NSString *)name withCompletion:(DJICompletionBlock)completion
      Header:DJIBaseProduct.h
      Description:

      Retrieves the model of the product.

      Input Parameters:
      NSString * nameName to be set to the aircraft.
      DJICompletionBlock completionAsynchronous execution result.
      method getNameWithCompletion
      - (void)getNameWithCompletion:(void (^)(NSString *_Nullable name, NSError *_Nullable error))completion
      Header:DJIBaseProduct.h
      Description:

      Retrieves the model of the product.

      Input Parameters:
      NSString *_Nullable nameThe device's name.
      NSError *_Nullable errorError retrieving the value.
      void (^)(NSString *_Nullable name, NSError *_Nullable error) completionAsynchronous execution result with name.
      method isFirmwareVersion:newerThanVersion
      - (BOOL)isFirmwareVersion:(NSString *)versionToTest newerThanVersion:(NSString *)otherVersion
      Header:DJIBaseProduct.h
      Description:

      Utility method to compare a version to the other.

      Input Parameters:
      NSString * versionToTestVersion string to compare.
      NSString * otherVersionVersion string to compare.
      Return:
      BOOLA boolean value.
      property
      property model
      @property (nonatomic, strong, readonly) NSString *_Nullable model
      Header:DJIBaseProduct.h
      SDK Key:DJIProductKey.DJIProductParamModelName
      Description:

      Retrieves the model of the product. See DJIAircraft and DJIHandheld for the possible strings that can be returned.

      Components
      property
      property camera
      @property(nonatomic, readonly) DJICamera *_Nullable camera
      Header:DJIBaseProduct.h
      Description:

      Retrieves an instance of the device's camera. Only supported by the product with single gimbal, except Zenmuse XT2 and Mavic 2 Enterprise Camera.

      See Also:

      DJICamera

      property
      property battery
      @property(nonatomic, readonly) DJIBattery *_Nullable battery
      Header:DJIBaseProduct.h
      Description:

      Retrieves an instance of the product's smart battery. When using products with multiple batteries, such as the M600 or Inspire 2, use batteries, as this method will only return a single battery.

      See Also:

      DJIBattery

      property
      property gimbal
      @property(nonatomic, readonly) DJIGimbal *_Nullable gimbal
      Header:DJIBaseProduct.h
      Description:

      Retrieves an instance of the device's gimbal.

      See Also:

      DJIGimbal

      property
      property videoFeeder
      @property (nonatomic, readonly, nullable) DJIVideoFeeder *videoFeeder
      Header:DJIBaseProduct.h
      Description:

      The videoFeeder.

      See Also:

      DJIVideoFeeder

      State Updates
      protocol
      protocol DJIBaseProductDelegate
      @protocol DJIBaseProductDelegate <NSObject>
      Header:DJIBaseProduct.h
      Inherits From:NSObject
      Description:

      This protocol provides delegate methods that notify user of changes in connectivity between the DJI product and the mobile device, changes in components that are part of the product, and diagnostic information from the product.

      Protocol Methods:
      method product:didUpdateDiagnosticsInformation
      @optional
      - (void)product:(DJIBaseProduct *_Nonnull)product didUpdateDiagnosticsInformation:(NSArray *_Nonnull)info
      Header:DJIBaseProduct.h
      Description:

      Called when the product's diagnostic information is updated.

      Input Parameters:
      DJIBaseProduct *_Nonnull productAn instance of DJIBaseProduct.
      NSArray *_Nonnull infoAn NSArray of product's current diagnostics information.
      CompletionBlock
      typedef block
      typedef block DJICompletionBlock
      typedef void (^_Nullable DJICompletionBlock)(NSError *_Nullable error)
      Header:DJIBaseProduct.h
      Description:

      Completion block for asynchronous operations. This completion block is used for methods that return at an unknown future time.

      Input Parameters:
      NSError *_Nullable errorAn error object if an error occurred during async operation, or nil if no error occurred.