DJI Mobile SDK Documentation

      class DJIBluetoothProductConnector

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

      Some DJI products can be controlled using the Mobile SDK over a Bluetooth wireless connection. This class contains methods to search for, connect to, and disconnect from such products.

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

      Delegate that receives the product list found by the connector.

      See Also:

      DJIBluetoothProductConnectorDelegate

      method searchBluetoothProductsWithCompletion
      - (void)searchBluetoothProductsWithCompletion:(DJICompletionBlock)completion
      Header:DJIBluetoothProductConnector.h
      Description:

      Used to start searching for DJI Products that are near the mobile device and can be controlled with the Mobile SDK using Bluetooth. Use connectorDidFindProducts to receive the product list.

      Input Parameters:
      DJICompletionBlock completionCompletion block returns the command execution result. It is called once the searching is started.
      method connectProduct:withCompletion
      - (void)connectProduct:(CBPeripheral *_Nullable)product
      withCompletion:(DJICompletionBlock)completion
      Header:DJIBluetoothProductConnector.h
      Description:

      Connects to the DJI product using Bluetooth. Once it is connected, DJISDKManager can be used to access the product.

      Input Parameters:
      CBPeripheral *_Nullable productThe Bluetooth product to connect to.
      DJICompletionBlock completionThe completion block returns the command execution result.
      method disconnectProductWithCompletion
      - (void)disconnectProductWithCompletion:(DJICompletionBlock)completion
      Header:DJIBluetoothProductConnector.h
      Description:

      Disconnects connected Bluetooth product.

      Input Parameters:
      DJICompletionBlock completionThe completion block returns the command execution result.
      protocol DJIBluetoothProductConnectorDelegate
      @protocol DJIBluetoothProductConnectorDelegate <NSObject>
      Header:DJIBluetoothProductConnector.h
      Inherits From:NSObject
      Description:

      This protocol provides the delegate method that receives the list of DJI products that can be controlled by the Mobile SDK using a Bluetooth connection from the mobile device.

      Protocol Methods:
      method connectorDidFindProducts
      required
      - (void)connectorDidFindProducts:(NSArray<CBPeripheral *>* _Nullable)peripherals
      Header:DJIBluetoothProductConnector.h
      Description:

      Provides the list of DJI products that can be connected with the mobile device over Bluetooth. Delegate will continue to receive an updated list after searchBluetoothProductsWithCompletion is called until the searching is finished (either product is connected or after 10s).

      Input Parameters:
      NSArray<CBPeripheral *>* _Nullable peripheralsA list of DJI products found by the connector.