Tuya iOS Smart Life App SDK 5.15.0
<ThingSmartBLEManagerDelegate> Protocol Reference

The delegate for scanning and notifications of Bluetooth status changes. More...

#import <ThingSmartBLEManager.h>

Inheritance diagram for <ThingSmartBLEManagerDelegate>:

Instance Methods

(void) - bluetoothDidUpdateState:
 
(void) - onCentralDidDisconnectFromDevice:error:
 
(void) - didDiscoveryDeviceWithUUID:productKey:
 
(void) - didDiscoveryDeviceWithDeviceInfo:
 
(void) - bleManager:didFinishActivateDevice:error:
 
(void) - bleReceiveTransparentData:devId:
 
(void) - getWeatherWithDevId:codes:useLocation:completion:
 
(void) - newGetWeatherWithDevId:codes:useLocation:completion:
 
(NSArray< ThingSmartDeviceModel * > *) - bleManagerDeviceListDataSource
 Data source for the device list. More...
 
(void) - bluetoothDidUpdateState:
 
(void) - onCentralDidDisconnectFromDevice:error:
 
(void) - didDiscoveryDeviceWithUUID:productKey:
 
(void) - didDiscoveryDeviceWithDeviceInfo:
 
(void) - bleManager:didFinishActivateDevice:error:
 
(void) - bleReceiveTransparentData:devId:
 
(void) - getWeatherWithDevId:codes:useLocation:completion:
 
(void) - newGetWeatherWithDevId:codes:useLocation:completion:
 
(NSArray< ThingSmartDeviceModel * > *) - bleManagerDeviceListDataSource
 Data source for the device list. More...
 

Detailed Description

The delegate for scanning and notifications of Bluetooth status changes.

Definition at line 41 of file ThingSmartBLEManager.h.

Method Documentation

◆ bleManager:didFinishActivateDevice:error: [1/2]

- (void) bleManager: (ThingSmartBLEManager *)  manager
didFinishActivateDevice: (nullable id)  deviceModel
error: (nullable NSError *)  error 
optional

The result of activating Bluetooth LE devices.

Parameters
managerThe class.
deviceModelCalled when the task is finished. DeviceModel is returned.
errorCalled when the task is interrupted by an error.

◆ bleManager:didFinishActivateDevice:error: [2/2]

- (void) bleManager: (ThingSmartBLEManager *)  manager
didFinishActivateDevice: (nullable id)  deviceModel
error: (nullable NSError *)  error 
optional

The result of activating Bluetooth LE devices.

Parameters
managerThe class.
deviceModelCalled when the task is finished. DeviceModel is returned.
errorCalled when the task is interrupted by an error.

◆ bleManagerDeviceListDataSource [1/2]

- (NSArray< ThingSmartDeviceModel * > *) bleManagerDeviceListDataSource
optional

Data source for the device list.

◆ bleManagerDeviceListDataSource [2/2]

- (NSArray< ThingSmartDeviceModel * > *) bleManagerDeviceListDataSource
optional

Data source for the device list.

◆ bleReceiveTransparentData:devId: [1/2]

- (void) bleReceiveTransparentData: (NSData *)  data
devId: (NSString *)  devId 
optional

Receives the transmission data from the device.

Parameters
dataTransmission data that is sent by the device.
devIdThe device ID.

◆ bleReceiveTransparentData:devId: [2/2]

- (void) bleReceiveTransparentData: (NSData *)  data
devId: (NSString *)  devId 
optional

Receives the transmission data from the device.

Parameters
dataTransmission data that is sent by the device.
devIdThe device ID.

◆ bluetoothDidUpdateState: [1/2]

- (void) bluetoothDidUpdateState: (BOOL)  isPoweredOn
optional

The notification for Bluetooth status changes.

Parameters
isPoweredOnIndicates the Bluetooth status. Valid values: on and off.

◆ bluetoothDidUpdateState: [2/2]

- (void) bluetoothDidUpdateState: (BOOL)  isPoweredOn
optional

The notification for Bluetooth status changes.

Parameters
isPoweredOnIndicates the Bluetooth status. Valid values: on and off.

◆ didDiscoveryDeviceWithDeviceInfo: [1/2]

- (void) didDiscoveryDeviceWithDeviceInfo: (ThingBLEAdvModel *)  deviceInfo
optional

The result of scanning inactive devices.

Parameters
deviceInfoThe advertisingData model for the inactive device.

◆ didDiscoveryDeviceWithDeviceInfo: [2/2]

- (void) didDiscoveryDeviceWithDeviceInfo: (ThingBLEAdvModel *)  deviceInfo
optional

The result of scanning inactive devices.

Parameters
deviceInfoThe advertisingData model for the inactive device.

◆ didDiscoveryDeviceWithUUID:productKey: [1/2]

- (void) didDiscoveryDeviceWithUUID: (NSString *)  uuid
productKey: ("This method is)  deprecated
(Use ThingSmartBLEManager::didDiscoveryDeviceWithDeviceInfo:instead")  __deprecated_msg 
optional

The result of scanning inactive devices.

Parameters
uuidThe device UUID.
productKeyThe product ID for the device.
Deprecated:
This method is deprecated. Use ThingSmartBLEManager::didDiscoveryDeviceWithDeviceInfo: instead.

◆ didDiscoveryDeviceWithUUID:productKey: [2/2]

- (void) didDiscoveryDeviceWithUUID: (NSString *)  uuid
productKey: ("This method is)  deprecated
(Use ThingSmartBLEManager::didDiscoveryDeviceWithDeviceInfo:instead")  __deprecated_msg 
optional

The result of scanning inactive devices.

Parameters
uuidThe device UUID.
productKeyThe product ID for the device.
Deprecated:
This method is deprecated. Use ThingSmartBLEManager::didDiscoveryDeviceWithDeviceInfo: instead.

◆ getWeatherWithDevId:codes:useLocation:completion: [1/2]

- (void) getWeatherWithDevId: (NSString *)  devId
codes: (NSString *)  codes
useLocation: (BOOL)  whetherUse
completion: ("This method is)  deprecated
(Use newGetWeatherWithDevId:codes:useLocation:completion:instead")  __deprecated_msg 
optional

Get weather information

Parameters
devIdThe device ID.
codescodes
whetherUseWhether to request weather information using location information
completioncompletion

◆ getWeatherWithDevId:codes:useLocation:completion: [2/2]

- (void) getWeatherWithDevId: (NSString *)  devId
codes: (NSString *)  codes
useLocation: (BOOL)  whetherUse
completion: ("This method is)  deprecated
(Use newGetWeatherWithDevId:codes:useLocation:completion:instead")  __deprecated_msg 
optional

Get weather information

Parameters
devIdThe device ID.
codescodes
whetherUseWhether to request weather information using location information
completioncompletion

◆ newGetWeatherWithDevId:codes:useLocation:completion: [1/2]

- (void) newGetWeatherWithDevId: (NSString *)  devId
codes: (NSString *)  codes
useLocation: (BOOL)  whetherUse
completion: (void(^)(NSDictionary *_Nullable weatherData))  completion 
optional

◆ newGetWeatherWithDevId:codes:useLocation:completion: [2/2]

- (void) newGetWeatherWithDevId: (NSString *)  devId
codes: (NSString *)  codes
useLocation: (BOOL)  whetherUse
completion: (void(^)(NSDictionary *_Nullable weatherData))  completion 
optional

◆ onCentralDidDisconnectFromDevice:error: [1/2]

- (void) onCentralDidDisconnectFromDevice: (NSString *)  devId
error: (NSError *)  error 
optional

The result of disconnecting the device.

Parameters
devIdThe device ID.
errorAn error occurs while processing the request.

◆ onCentralDidDisconnectFromDevice:error: [2/2]

- (void) onCentralDidDisconnectFromDevice: (NSString *)  devId
error: (NSError *)  error 
optional

The result of disconnecting the device.

Parameters
devIdThe device ID.
errorAn error occurs while processing the request.

The documentation for this protocol was generated from the following files: