Tuya iOS Smart Life App SDK 5.15.0
ThingSmartDiscovery Class Reference

#import <ThingSmartDiscovery.h>

Inheritance diagram for ThingSmartDiscovery:

Instance Methods

(void) - getTokenSuccess:failure:
 
(void) - startDiscoveryWithSsid:password:timeout:success:failure:
 
(void) - startDiscoveryWithSsid:password:token:timeout:success:failure:
 
(void) - stopDiscovery
 Stops scanning for devices. More...
 
(void) - getTokenSuccess:failure:
 
(void) - startDiscoveryWithSsid:password:timeout:success:failure:
 
(void) - startDiscoveryWithSsid:password:token:timeout:success:failure:
 
(void) - stopDiscovery
 Stops scanning for devices. More...
 
(void) - bindDeviceWithHomeId:devIds:success:failure:
 
(void) - bindDeviceWithHomeId:devIds:success:failure:
 

Properties

id< ThingSmartDiscoveryDelegatedelegate
 

Detailed Description

Definition at line 26 of file ThingSmartDiscovery.h.

Method Documentation

◆ bindDeviceWithHomeId:devIds:success:failure: [1/2]

- (void) bindDeviceWithHomeId: (long long)  homeId
devIds: (NSArray< NSString * > *)  devIds
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds devices to a specified home.

Parameters
homeIdThe home ID.
devIdsA list of device IDs.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartDiscovery(Home).

◆ bindDeviceWithHomeId:devIds:success:failure: [2/2]

- (void) bindDeviceWithHomeId: (long long)  homeId
devIds: (NSArray< NSString * > *)  devIds
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Adds devices to a specified home.

Parameters
homeIdThe home ID.
devIdsA list of device IDs.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartDiscovery(Home).

◆ getTokenSuccess:failure: [1/2]

- (void) getTokenSuccess: (ThingSuccessString success
failure: (ThingFailureError failure 

Returns the pairing token. This token is valid for 10 minutes.

Parameters
successCalled when the task is finished. ThingSuccessString is returned.
failureCalled when the task is interrupted by an error.

◆ getTokenSuccess:failure: [2/2]

- (void) getTokenSuccess: (ThingSuccessString success
failure: (ThingFailureError failure 

Returns the pairing token. This token is valid for 10 minutes.

Parameters
successCalled when the task is finished. ThingSuccessString is returned.
failureCalled when the task is interrupted by an error.

◆ startDiscoveryWithSsid:password:timeout:success:failure: [1/2]

- (void) startDiscoveryWithSsid: (NSString *)  ssid
password: (NSString *)  password
timeout: (NSTimeInterval)  timeout
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Starts to scan for devices.

Parameters
ssidThe name of the router.
passwordThe password of the router.
timeoutThe timeout value. Unit: seconds. Default value: 100.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ startDiscoveryWithSsid:password:timeout:success:failure: [2/2]

- (void) startDiscoveryWithSsid: (NSString *)  ssid
password: (NSString *)  password
timeout: (NSTimeInterval)  timeout
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Starts to scan for devices.

Parameters
ssidThe name of the router.
passwordThe password of the router.
timeoutThe timeout value. Unit: seconds. Default value: 100.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ startDiscoveryWithSsid:password:token:timeout:success:failure: [1/2]

- (void) startDiscoveryWithSsid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Starts to scan for devices by using a token.

Parameters
ssidThe name of the router.
passwordThe password of the router.
tokenThe pairing token.
timeoutThe timeout value. Unit: seconds. Default value: 100.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ startDiscoveryWithSsid:password:token:timeout:success:failure: [2/2]

- (void) startDiscoveryWithSsid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Starts to scan for devices by using a token.

Parameters
ssidThe name of the router.
passwordThe password of the router.
tokenThe pairing token.
timeoutThe timeout value. Unit: seconds. Default value: 100.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

◆ stopDiscovery [1/2]

- (void) stopDiscovery

Stops scanning for devices.

◆ stopDiscovery [2/2]

- (void) stopDiscovery

Stops scanning for devices.

Property Documentation

◆ delegate

- (id< ThingSmartDiscoveryDelegate >) delegate
readwritenonatomicweak

Definition at line 28 of file ThingSmartDiscovery.h.


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