DJIBluetoothProductConnector
@interface DJIBluetoothProductConnector : NSObject
Some DJI products can be controlled using the Mobile SDK on the mobile device over a Bluetooth wireless connection. This class contains methods to search for, connect to and disconnect from such products.
-
Delegate that receives the product list found by the connector.
Declaration
Objective-C
@property (readwrite, nonatomic) id<DJIBluetoothProductConnectorDelegate> _Nullable delegate; -
Start searching for DJI Products that are near the mobile device and can be controlled with the Mobile SDK using Bluetooth. Use
connectorDidFindProducts:inDJIBluetoothProductConnectorDelegateto receive the product list.Declaration
Objective-C
- (void)searchBluetoothProductsWithCompletion:(DJICompletionBlock)block;Parameters
blockCompletion block returns the command execution result. It is called once the searching is started.
-
Connects to the DJI product using Bluetooth. Once it is connected,
DJISDKManagercan be used to access the product.Declaration
Objective-C
- (void)connectProduct:(CBPeripheral *_Nullable)product withCompletion:(DJICompletionBlock)block;Parameters
productThe bluetooth product to connect to.
blockThe completion block returns the command execution result.
-
Disconnects current connected bluetooth product.
Declaration
Objective-C
- (void)disconnectProductWithCompletion:(DJICompletionBlock)block;Parameters
blockThe completion block returns the command execution result.
View on GitHub
DJIBluetoothProductConnector Class Reference