Tuya iOS Smart Life App SDK 5.15.0
ThingSmartActivator Class Reference

#import <ThingSmartActivator.h>

Inheritance diagram for ThingSmartActivator:

Instance Methods

() - __attribute__
 
(void) - getDeviceSecurityConfigs:failure:
 
(void) - startConfigWiFi:ssid:password:token:regInfo:timeout:
 
(void) - startConfigWiFi:ssid:password:token:timeout:
 
(void) - startActiveDeviceWithConfigurations:mode:timeout:
 
(void) - connectWiFiWithSSID:password:success:failure:
 
(void) - connectWifiWithSSIDPrefix:password:success:failure:
 
(void) - disconnectWifiWithSSID:
 
(void) - connectDeviceAndQueryWifiListWithTimeout:
 
(void) - connectDeviceAndQueryWifiListWithConfigurations:timeout:
 
(void) - resumeAPPlusWithSSID:password:token:timeout:
 
(void) - resumeAPPlusWithSSID:password:token:timeout:reg:
 
(int) - resumeConfigWiFi:error:
 
(void) - scanConnectableWiFiList:success:failure:
 
(void) - startConfigWiFiWithToken:timeout:
 
(void) - startConfigWiFiWithToken:productId:timeout:
 
(void) - startEZMultiConfigWiFiWithSsid:password:token:timeout:
 
(void) - stopConfigWiFi
 Stop configuring the network.␛. More...
 
(void) - continueConfigSecurityLevelDevice
 
(void) - startConfig4GGatewayByAP:apn:username:password:token:regInfo:timeout:
 
(void) - activeSubDeviceWithGwId:timeout:
 
(void) - activeSubDeviceWithGwId:timeout:extensions:
 
(void) - activeSubDeviceWithGwId:mac:installCode:timeout:
 
() - __attribute__
 
(void) - getDeviceSecurityConfigs:failure:
 
(void) - startConfigWiFi:ssid:password:token:regInfo:timeout:
 
(void) - startConfigWiFi:ssid:password:token:timeout:
 
(void) - startActiveDeviceWithConfigurations:mode:timeout:
 
(void) - connectWiFiWithSSID:password:success:failure:
 
(void) - connectWifiWithSSIDPrefix:password:success:failure:
 
(void) - disconnectWifiWithSSID:
 
(void) - connectDeviceAndQueryWifiListWithTimeout:
 
(void) - connectDeviceAndQueryWifiListWithConfigurations:timeout:
 
(void) - resumeAPPlusWithSSID:password:token:timeout:
 
(void) - resumeAPPlusWithSSID:password:token:timeout:reg:
 
(int) - resumeConfigWiFi:error:
 
(void) - scanConnectableWiFiList:success:failure:
 
(void) - startConfigWiFiWithToken:timeout:
 
(void) - startConfigWiFiWithToken:productId:timeout:
 
(void) - startEZMultiConfigWiFiWithSsid:password:token:timeout:
 
(void) - stopConfigWiFi
 Stop configuring the network.␛. More...
 
(void) - continueConfigSecurityLevelDevice
 
(void) - startConfig4GGatewayByAP:apn:username:password:token:regInfo:timeout:
 
(void) - activeSubDeviceWithGwId:timeout:
 
(void) - activeSubDeviceWithGwId:timeout:extensions:
 
(void) - activeSubDeviceWithGwId:mac:installCode:timeout:
 
(void) - getTokenWithMeshId:nodeId:productId:uuid:authKey:version:success:failure:
 
(void) - getTokenWithMeshId:nodeId:productId:uuid:authKey:version:success:failure:
 
(void) - startBleMeshConfigWiFiWithSsid:password:token:timeout:
 
(void) - startBleMeshConfigWiFiWithSsid:password:token:timeout:
 

Class Methods

(nullable instancetype) + sharedInstance
 Returns a singleton of the class. More...
 
(NSString *) + currentWifiSSID
 
(NSString *) + currentWifiBSSID
 
(void) + getSSID:failure:
 
(void) + getBSSID:failure:
 
(nullable instancetype) + sharedInstance
 Returns a singleton of the class. More...
 
(NSString *) + currentWifiSSID
 
(NSString *) + currentWifiBSSID
 
(void) + getSSID:failure:
 
(void) + getBSSID:failure:
 

Properties

id< ThingSmartActivatorDelegatedelegate
 
(void) + parseQRCode:success:failure:
 Returns the parsed QR Code from device. More...
 
(void) - activeSubDeviceWithGwId:installCodes:timeout:
 
(void) - stopActiveSubDeviceWithGwId:
 
(void) - activeGatewayDeviceWithGwId:productId:token:timeout:
 
(void) - resetDeviceWithUUID:
 
(void) - getTokenWithHomeId:success:failure:
 
(void) - getTokenWithProductKey:homeId:success:failure:
 
(void) - getTokenWithUUID:homeId:success:failure:
 
(void) - renewalToken:success:failure:
 
(void) - resumeToken:
 check token when cancel. More...
 
(void) + parseQRCode:success:failure:
 Returns the parsed QR Code from device. More...
 
(void) - activeSubDeviceWithGwId:installCodes:timeout:
 
(void) - stopActiveSubDeviceWithGwId:
 
(void) - activeGatewayDeviceWithGwId:productId:token:timeout:
 
(void) - resetDeviceWithUUID:
 
(void) - getTokenWithHomeId:success:failure:
 
(void) - getTokenWithProductKey:homeId:success:failure:
 
(void) - getTokenWithUUID:homeId:success:failure:
 
(void) - renewalToken:success:failure:
 
(void) - resumeToken:
 check token when cancel. More...
 

Detailed Description

Definition at line 96 of file ThingSmartActivator.h.

Method Documentation

◆ __attribute__ [1/2]

- __attribute__ ((unavailable("Must use -[[ThingSmartActivator alloc] init] instead."))) 

◆ __attribute__ [2/2]

- __attribute__ ((unavailable("Must use -[[ThingSmartActivator alloc] init] instead."))) 

◆ activeGatewayDeviceWithGwId:productId:token:timeout: [1/2]

- (void) activeGatewayDeviceWithGwId: (NSString *)  gwId
productId: (NSString *)  productId
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Activates wired gateway

Parameters
gwIdThe gateway ID.
productIdThe gateway PID
tokenThe pairing token.
timeoutThe timeout value. Unit: seconds. Default value: 100

◆ activeGatewayDeviceWithGwId:productId:token:timeout: [2/2]

- (void) activeGatewayDeviceWithGwId: (NSString *)  gwId
productId: (NSString *)  productId
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Activates wired gateway

Parameters
gwIdThe gateway ID.
productIdThe gateway PID
tokenThe pairing token.
timeoutThe timeout value. Unit: seconds. Default value: 100

◆ activeSubDeviceWithGwId:installCodes:timeout: [1/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
installCodes: (NSArray< NSDictionary * > *)  installCodes
timeout: (NSTimeInterval)  timeout 

Activate zigbee sub-devices with installCode(QRCode)

Parameters
gwIdGateway Id␛␛
installCodes@["installcode": "", @"mac": @"", @"manufaturer_info": @"none"}] @param timeout Timeout, default 100 seconds @note values keyed by @"installCode", @"mac" MUST be lowercase

◆ activeSubDeviceWithGwId:installCodes:timeout: [2/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
installCodes: (NSArray< NSDictionary * > *)  installCodes
timeout: (NSTimeInterval)  timeout 

Activate zigbee sub-devices with installCode(QRCode)

Parameters
gwIdGateway Id␛␛
installCodes@["installcode": "", @"mac": @"", @"manufaturer_info": @"none"}] @param timeout Timeout, default 100 seconds @note values keyed by @"installCode", @"mac" MUST be lowercase

◆ activeSubDeviceWithGwId:mac:installCode:timeout: [1/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
mac: (NSString *)  mac
installCode: (NSString *)  installCode
timeout: (NSTimeInterval)  timeout 

Activate zigbee sub-devices with installCode

Parameters
gwIdGateway Id␛␛
macmac
installCodeinstallCode
timeoutTimeout, default 100 seconds

◆ activeSubDeviceWithGwId:mac:installCode:timeout: [2/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
mac: (NSString *)  mac
installCode: (NSString *)  installCode
timeout: (NSTimeInterval)  timeout 

Activate zigbee sub-devices with installCode

Parameters
gwIdGateway Id␛␛
macmac
installCodeinstallCode
timeoutTimeout, default 100 seconds

◆ activeSubDeviceWithGwId:timeout: [1/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
timeout: (NSTimeInterval)  timeout 

Activate sub-devices e.g. zigbee, Wi-Fi sub-devices.

Parameters
gwIdGateway Id␛␛
timeoutTimeout, default 100 seconds

◆ activeSubDeviceWithGwId:timeout: [2/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
timeout: (NSTimeInterval)  timeout 

Activate sub-devices e.g. zigbee, Wi-Fi sub-devices.

Parameters
gwIdGateway Id␛␛
timeoutTimeout, default 100 seconds

◆ activeSubDeviceWithGwId:timeout:extensions: [1/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
timeout: (NSTimeInterval)  timeout
extensions: (nullable NSDictionary *)  extensions 

◆ activeSubDeviceWithGwId:timeout:extensions: [2/2]

- (void) activeSubDeviceWithGwId: (NSString *)  gwId
timeout: (NSTimeInterval)  timeout
extensions: (nullable NSDictionary *)  extensions 

◆ connectDeviceAndQueryWifiListWithConfigurations:timeout: [1/2]

- (void) connectDeviceAndQueryWifiListWithConfigurations: (ThingSmartPairConfiguration *)  configurations
timeout: (NSTimeInterval)  timeout 

◆ connectDeviceAndQueryWifiListWithConfigurations:timeout: [2/2]

- (void) connectDeviceAndQueryWifiListWithConfigurations: (ThingSmartPairConfiguration *)  configurations
timeout: (NSTimeInterval)  timeout 

◆ connectDeviceAndQueryWifiListWithTimeout: [1/2]

- (void) connectDeviceAndQueryWifiListWithTimeout: (NSTimeInterval)  timeout

Start connect device and query wifi list

Parameters
timeouttimeout

◆ connectDeviceAndQueryWifiListWithTimeout: [2/2]

- (void) connectDeviceAndQueryWifiListWithTimeout: (NSTimeInterval)  timeout

Start connect device and query wifi list

Parameters
timeouttimeout

◆ connectWiFiWithSSID:password:success:failure: [1/2]

- (void) connectWiFiWithSSID: (NSString *)  ssid
password: (NSString *)  password
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Start connect wifi

Parameters
ssidName of route.
passwordPassword of route.
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

◆ connectWiFiWithSSID:password:success:failure: [2/2]

- (void) connectWiFiWithSSID: (NSString *)  ssid
password: (NSString *)  password
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Start connect wifi

Parameters
ssidName of route.
passwordPassword of route.
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

◆ connectWifiWithSSIDPrefix:password:success:failure: [1/2]

- (void) connectWifiWithSSIDPrefix: (NSString *)  SSIDPrefix
password: (NSString *)  password
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Start connect wifi with SSID prefix

Parameters
SSIDPrefixRoute name prefix
passwordPassword of route.
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

◆ connectWifiWithSSIDPrefix:password:success:failure: [2/2]

- (void) connectWifiWithSSIDPrefix: (NSString *)  SSIDPrefix
password: (NSString *)  password
success: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

Start connect wifi with SSID prefix

Parameters
SSIDPrefixRoute name prefix
passwordPassword of route.
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

◆ continueConfigSecurityLevelDevice [1/2]

- (void) continueConfigSecurityLevelDevice

Continue config the device witch has security level. Notice: before calling this method, please make sure that the SSID is the same as the one the user selected at the beginning.

◆ continueConfigSecurityLevelDevice [2/2]

- (void) continueConfigSecurityLevelDevice

Continue config the device witch has security level. Notice: before calling this method, please make sure that the SSID is the same as the one the user selected at the beginning.

◆ currentWifiBSSID [1/2]

+ (NSString *) currentWifiBSSID

Get the BSSID of the current Wi-Fi.

See also
+ currentWifiSSID.
Returns
Wi-Fi BSSID

◆ currentWifiBSSID [2/2]

+ (NSString *) currentWifiBSSID

Get the BSSID of the current Wi-Fi.

See also
+ currentWifiSSID.
Returns
Wi-Fi BSSID

◆ currentWifiSSID [1/2]

+ (NSString *) currentWifiSSID

Get the SSID of the current Wi-Fi.

Starting with iOS 12, calls to this function will return nil by default, and will only return the correct value if "Access WiFi Information" is enabled in the Xcode project. This function needs to be activated in the App IDs on the developer page in order to use it. Starting with iOS 13, at least one of the following three conditions must also be met.

  • An app that has been granted Location Services permissions.
  • A VPN application that is currently enabled.
  • Use of NEHotspotConfiguration (only Wi-Fi networks configured through the app are supported).
See also
https://developer.apple.com/videos/play/wwdc2019/713/
Returns
Wi-Fi SSID

◆ currentWifiSSID [2/2]

+ (NSString *) currentWifiSSID

Get the SSID of the current Wi-Fi.

Starting with iOS 12, calls to this function will return nil by default, and will only return the correct value if "Access WiFi Information" is enabled in the Xcode project. This function needs to be activated in the App IDs on the developer page in order to use it. Starting with iOS 13, at least one of the following three conditions must also be met.

  • An app that has been granted Location Services permissions.
  • A VPN application that is currently enabled.
  • Use of NEHotspotConfiguration (only Wi-Fi networks configured through the app are supported).
See also
https://developer.apple.com/videos/play/wwdc2019/713/
Returns
Wi-Fi SSID

◆ disconnectWifiWithSSID: [1/2]

- (void) disconnectWifiWithSSID: (NSString *)  ssid

◆ disconnectWifiWithSSID: [2/2]

- (void) disconnectWifiWithSSID: (NSString *)  ssid

◆ getBSSID:failure: [1/2]

+ (void) getBSSID: (ThingSuccessString success
failure: (ThingFailureError failure 

Asynchronously get the BSSID of the current Wi-Fi.

Parameters
successCalled when the task finishes successfully. ThingSuccessString will be returned.
failureCalled when the task is interrupted by an error.

◆ getBSSID:failure: [2/2]

+ (void) getBSSID: (ThingSuccessString success
failure: (ThingFailureError failure 

Asynchronously get the BSSID of the current Wi-Fi.

Parameters
successCalled when the task finishes successfully. ThingSuccessString will be returned.
failureCalled when the task is interrupted by an error.

◆ getDeviceSecurityConfigs:failure: [1/2]

- (void) getDeviceSecurityConfigs: (ThingSuccessDict success
failure: (ThingFailureError failure 

◆ getDeviceSecurityConfigs:failure: [2/2]

- (void) getDeviceSecurityConfigs: (ThingSuccessDict success
failure: (ThingFailureError failure 

◆ getSSID:failure: [1/2]

+ (void) getSSID: (ThingSuccessString success
failure: (ThingFailureError failure 

Get the SSID of the current Wi-Fi asynchronously.

See also
+ currentWifiSSID
Parameters
successCalled when the task finishes successfully. ThingSuccessString will be returned.
failureCalled when the task is interrupted by an error.

◆ getSSID:failure: [2/2]

+ (void) getSSID: (ThingSuccessString success
failure: (ThingFailureError failure 

Get the SSID of the current Wi-Fi asynchronously.

See also
+ currentWifiSSID
Parameters
successCalled when the task finishes successfully. ThingSuccessString will be returned.
failureCalled when the task is interrupted by an error.

◆ getTokenWithHomeId:success:failure: [1/2]

- (void) getTokenWithHomeId: (long long)  homeId
success: (ThingSuccessString success
failure: (ThingFailureError failure 

Returns the pairing token by home ID. This token is valid for 10 minutes.

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

◆ getTokenWithHomeId:success:failure: [2/2]

- (void) getTokenWithHomeId: (long long)  homeId
success: (ThingSuccessString success
failure: (ThingFailureError failure 

Returns the pairing token by home ID. This token is valid for 10 minutes.

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

◆ getTokenWithMeshId:nodeId:productId:uuid:authKey:version:success:failure: [1/2]

- (void) getTokenWithMeshId: (NSString *)  meshId
nodeId: (NSString *)  nodeId
productId: (NSString *)  productId
uuid: (NSString *)  uuid
authKey: (NSString *)  authKey
version: (NSString *)  version
success: (ThingSuccessString success
failure: (ThingFailureError failure 

Adds a Wi-Fi connector to a mesh network and returns a pairing token that is valid for 10 minutes.

Parameters
meshIdThe mesh ID.
nodeIdThe node ID.
productIdThe product ID.
uuidThe device UUID.
authKeyThe authorization key.
versionThe version.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartActivator(BleMesh).

◆ getTokenWithMeshId:nodeId:productId:uuid:authKey:version:success:failure: [2/2]

- (void) getTokenWithMeshId: (NSString *)  meshId
nodeId: (NSString *)  nodeId
productId: (NSString *)  productId
uuid: (NSString *)  uuid
authKey: (NSString *)  authKey
version: (NSString *)  version
success: (ThingSuccessString success
failure: (ThingFailureError failure 

Adds a Wi-Fi connector to a mesh network and returns a pairing token that is valid for 10 minutes.

Parameters
meshIdThe mesh ID.
nodeIdThe node ID.
productIdThe product ID.
uuidThe device UUID.
authKeyThe authorization key.
versionThe version.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartActivator(BleMesh).

◆ getTokenWithProductKey:homeId:success:failure: [1/2]

- (void) getTokenWithProductKey: (NSString *)  productKey
homeId: (long long)  homeId
success: (ThingSuccessString success
failure: (ThingFailureError failure 

Returns the pairing token by product ID. This token is valid for 10 minutes.

Parameters
productKeyThe product ID.
homeIdThe home ID.
successCalled when the task is finished. ThingSuccessString is returned.
failureCalled when the task is interrupted by an error.

◆ getTokenWithProductKey:homeId:success:failure: [2/2]

- (void) getTokenWithProductKey: (NSString *)  productKey
homeId: (long long)  homeId
success: (ThingSuccessString success
failure: (ThingFailureError failure 

Returns the pairing token by product ID. This token is valid for 10 minutes.

Parameters
productKeyThe product ID.
homeIdThe home ID.
successCalled when the task is finished. ThingSuccessString is returned.
failureCalled when the task is interrupted by an error.

◆ getTokenWithUUID:homeId:success:failure: [1/2]

- (void) getTokenWithUUID: (NSString *)  uuid
homeId: (long long)  homeId
success: (ThingSuccessString success
failure: (ThingFailureError failure 

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

Parameters
uuidThe device UUID.
homeIdThe home ID.
successCalled when the task is finished. ThingSuccessString is returned.
failureCalled when the task is interrupted by an error.

◆ getTokenWithUUID:homeId:success:failure: [2/2]

- (void) getTokenWithUUID: (NSString *)  uuid
homeId: (long long)  homeId
success: (ThingSuccessString success
failure: (ThingFailureError failure 

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

Parameters
uuidThe device UUID.
homeIdThe home ID.
successCalled when the task is finished. ThingSuccessString is returned.
failureCalled when the task is interrupted by an error.

◆ parseQRCode:success:failure: [1/2]

+ (void) parseQRCode: (NSString *)  content
success: (ThingSuccessID success
failure: (ThingFailureError failure 

Returns the parsed QR Code from device.

Parameters
contentQR Code content
successCalled when the task is finished. ThingSuccessId is returned.
failureCalled when the task is interrupted by an error.

◆ parseQRCode:success:failure: [2/2]

+ (void) parseQRCode: (NSString *)  content
success: (ThingSuccessID success
failure: (ThingFailureError failure 

Returns the parsed QR Code from device.

Parameters
contentQR Code content
successCalled when the task is finished. ThingSuccessId is returned.
failureCalled when the task is interrupted by an error.

◆ renewalToken:success:failure: [1/2]

- (void) renewalToken: (NSString *)  token
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Renewal the pairing token by token. This token is valid for 10 minutes.

Parameters
tokenThe token
successCalled when the task is finished. ThingSuccessBool is returned.
failureCalled when the task is interrupted by an error.

◆ renewalToken:success:failure: [2/2]

- (void) renewalToken: (NSString *)  token
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Renewal the pairing token by token. This token is valid for 10 minutes.

Parameters
tokenThe token
successCalled when the task is finished. ThingSuccessBool is returned.
failureCalled when the task is interrupted by an error.

◆ resetDeviceWithUUID: [1/2]

- (void) resetDeviceWithUUID: (NSString *)  uuid

◆ resetDeviceWithUUID: [2/2]

- (void) resetDeviceWithUUID: (NSString *)  uuid

◆ resumeAPPlusWithSSID:password:token:timeout: [1/2]

- (void) resumeAPPlusWithSSID: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

◆ resumeAPPlusWithSSID:password:token:timeout: [2/2]

- (void) resumeAPPlusWithSSID: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

◆ resumeAPPlusWithSSID:password:token:timeout:reg: [1/2]

- (void) resumeAPPlusWithSSID: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout
reg: (NSDictionary *)  reg 

◆ resumeAPPlusWithSSID:password:token:timeout:reg: [2/2]

- (void) resumeAPPlusWithSSID: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout
reg: (NSDictionary *)  reg 

◆ resumeConfigWiFi:error: [1/2]

- (int) resumeConfigWiFi: (ThingSmartPairingResumeConfigWiFiParam *)  param
error: (NSError **)  error 

If the device fails to connect to WiFi, call it to help you resume pairing. Only ap mode is supported.

See also
activator:didReceiveDevice:step:error: If this callback is received, the step is ThingActivatorStepFound, and ThingSmartPairingConnectWiFiFailedErrorDomain is returned.\ Check the errorcode to do something 0 connect wifi success 1 error wifi config info 2 router not found 3 wrong password 4 Failed to connect to router 5 config DHCP failed
ThingSmartPairingConnectWiFiFailedErrorDomainThingSmartPairingResumeConfigWiFiParam in {ThingSmartPairingCoreKit}.
ThingPairingErrorCode in {ThingSmartPairingCoreKit}.
Parameters
paramssid is required and mode needs to be ThingActivatorModeAP.
errorresume failed, check this error
Returns
0 success. resume failed, for the returned error code, please refer to the definition of the enum ThingPairingErrorCode

◆ resumeConfigWiFi:error: [2/2]

- (int) resumeConfigWiFi: (ThingSmartPairingResumeConfigWiFiParam *)  param
error: (NSError **)  error 

If the device fails to connect to WiFi, call it to help you resume pairing. Only ap mode is supported.

See also
activator:didReceiveDevice:step:error: If this callback is received, the step is ThingActivatorStepFound, and ThingSmartPairingConnectWiFiFailedErrorDomain is returned.\ Check the errorcode to do something 0 connect wifi success 1 error wifi config info 2 router not found 3 wrong password 4 Failed to connect to router 5 config DHCP failed
ThingSmartPairingConnectWiFiFailedErrorDomainThingSmartPairingResumeConfigWiFiParam in {ThingSmartPairingCoreKit}.
ThingPairingErrorCode in {ThingSmartPairingCoreKit}.
Parameters
paramssid is required and mode needs to be ThingActivatorModeAP.
errorresume failed, check this error
Returns
0 success. resume failed, for the returned error code, please refer to the definition of the enum ThingPairingErrorCode

◆ resumeToken: [1/2]

- (void) resumeToken: (NSString *)  token

check token when cancel.

◆ resumeToken: [2/2]

- (void) resumeToken: (NSString *)  token

check token when cancel.

◆ scanConnectableWiFiList:success:failure: [1/2]

- (void) scanConnectableWiFiList: (ThingSmartPairingScanWiFiListParam *)  param
success: (nullable void(^)(NSArray< ThingSmartPairingWiFiInfo * > *_Nullable listArray))  success
failure: (nullable void(^)(NSError *_Nullable error))  failure 

Scan the WiFi list by the device you're pairing. Only ap mode is supported.

Parameters
paramSet the limit parameter to limit the number of wifi scanned, or set timeInterval to limit the maximum scan duration.
See also
ThingSmartPairingScanWiFiListParam,ThingSmartPairingWiFiInfo in {ThingSmartPairingCoreKit}.
ThingPairingErrorCode in {ThingSmartPairingCoreKit}.
Parameters
successReturns an array of scanned WiFi objects
failureIf it fails, check the error information

◆ scanConnectableWiFiList:success:failure: [2/2]

- (void) scanConnectableWiFiList: (ThingSmartPairingScanWiFiListParam *)  param
success: (nullable void(^)(NSArray< ThingSmartPairingWiFiInfo * > *_Nullable listArray))  success
failure: (nullable void(^)(NSError *_Nullable error))  failure 

Scan the WiFi list by the device you're pairing. Only ap mode is supported.

Parameters
paramSet the limit parameter to limit the number of wifi scanned, or set timeInterval to limit the maximum scan duration.
See also
ThingSmartPairingScanWiFiListParam,ThingSmartPairingWiFiInfo in {ThingSmartPairingCoreKit}.
ThingPairingErrorCode in {ThingSmartPairingCoreKit}.
Parameters
successReturns an array of scanned WiFi objects
failureIf it fails, check the error information

◆ sharedInstance [1/2]

+ (nullable instancetype) sharedInstance

Returns a singleton of the class.

◆ sharedInstance [2/2]

+ (nullable instancetype) sharedInstance

Returns a singleton of the class.

◆ startActiveDeviceWithConfigurations:mode:timeout: [1/2]

- (void) startActiveDeviceWithConfigurations: (ThingSmartPairConfiguration *)  configurations
mode: (ThingActivatorMode)  mode
timeout: (NSTimeInterval)  timeout 

◆ startActiveDeviceWithConfigurations:mode:timeout: [2/2]

- (void) startActiveDeviceWithConfigurations: (ThingSmartPairConfiguration *)  configurations
mode: (ThingActivatorMode)  mode
timeout: (NSTimeInterval)  timeout 

◆ startBleMeshConfigWiFiWithSsid:password:token:timeout: [1/2]

- (void) startBleMeshConfigWiFiWithSsid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Connects a device to a Bluetooth mesh network.

Parameters
ssidThe router hotspot name.
passwordThe router hotspot password.
tokenThe pairing token.
timeoutThe timeout value is 100 seconds by default.

Provided by category ThingSmartActivator(BleMesh).

◆ startBleMeshConfigWiFiWithSsid:password:token:timeout: [2/2]

- (void) startBleMeshConfigWiFiWithSsid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Connects a device to a Bluetooth mesh network.

Parameters
ssidThe router hotspot name.
passwordThe router hotspot password.
tokenThe pairing token.
timeoutThe timeout value is 100 seconds by default.

Provided by category ThingSmartActivator(BleMesh).

◆ startConfig4GGatewayByAP:apn:username:password:token:regInfo:timeout: [1/2]

- (void) startConfig4GGatewayByAP: (NSString *)  oper
apn: (NSString *)  apn
username: (NSString *)  username
password: (NSString *)  password
token: (NSString *)  token
regInfo: (NSDictionary *)  regInfo
timeout: (NSTimeInterval)  timeout 

Start configuration 4G gateway by AP.

  • Parameters:
    • oper: operator
    • apn: apn
    • username: username
    • password: password
    • token: token
    • regInfo: regInfo
    • timeout: Timeout, default 100 seconds

◆ startConfig4GGatewayByAP:apn:username:password:token:regInfo:timeout: [2/2]

- (void) startConfig4GGatewayByAP: (NSString *)  oper
apn: (NSString *)  apn
username: (NSString *)  username
password: (NSString *)  password
token: (NSString *)  token
regInfo: (NSDictionary *)  regInfo
timeout: (NSTimeInterval)  timeout 

Start configuration 4G gateway by AP.

  • Parameters:
    • oper: operator
    • apn: apn
    • username: username
    • password: password
    • token: token
    • regInfo: regInfo
    • timeout: Timeout, default 100 seconds

◆ startConfigWiFi:ssid:password:token:regInfo:timeout: [1/2]

- (void) startConfigWiFi: (ThingActivatorMode)  mode
ssid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
regInfo: (nullable NSDictionary *)  regInfo
timeout: (NSTimeInterval)  timeout 

◆ startConfigWiFi:ssid:password:token:regInfo:timeout: [2/2]

- (void) startConfigWiFi: (ThingActivatorMode)  mode
ssid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
regInfo: (nullable NSDictionary *)  regInfo
timeout: (NSTimeInterval)  timeout 

◆ startConfigWiFi:ssid:password:token:timeout: [1/2]

- (void) startConfigWiFi: (ThingActivatorMode)  mode
ssid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Start configuration (Wireless config).

Parameters
modeConfig mode, EZ or AP.
ssidName of route.
passwordPassword of route.
tokenConfig Token.
timeoutTimeout, default 100 seconds.

◆ startConfigWiFi:ssid:password:token:timeout: [2/2]

- (void) startConfigWiFi: (ThingActivatorMode)  mode
ssid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Start configuration (Wireless config).

Parameters
modeConfig mode, EZ or AP.
ssidName of route.
passwordPassword of route.
tokenConfig Token.
timeoutTimeout, default 100 seconds.

◆ startConfigWiFiWithToken:productId:timeout: [1/2]

- (void) startConfigWiFiWithToken: (NSString *)  token
productId: (NSString *)  productId
timeout: ("Use - instead.")  __deprecated_msg[activeGatewayDeviceWithGwId:productId:token:timeout:] 

Start configuring the network to activate only one category of devices (Wired config).

Parameters
tokenConfig Token.
productIdProductId of device.
timeoutTimeout, default 100 seconds.

◆ startConfigWiFiWithToken:productId:timeout: [2/2]

- (void) startConfigWiFiWithToken: (NSString *)  token
productId: (NSString *)  productId
timeout: ("Use - instead.")  __deprecated_msg[activeGatewayDeviceWithGwId:productId:token:timeout:] 

Start configuring the network to activate only one category of devices (Wired config).

Parameters
tokenConfig Token.
productIdProductId of device.
timeoutTimeout, default 100 seconds.

◆ startConfigWiFiWithToken:timeout: [1/2]

- (void) startConfigWiFiWithToken: (NSString *)  token
timeout: ("Use - instead.")  __deprecated_msg[activeGatewayDeviceWithGwId:productId:token:timeout:] 

Start configuration (Wired config).

Parameters
tokenToken
timeoutTimeout, default 100 seconds.

◆ startConfigWiFiWithToken:timeout: [2/2]

- (void) startConfigWiFiWithToken: (NSString *)  token
timeout: ("Use - instead.")  __deprecated_msg[activeGatewayDeviceWithGwId:productId:token:timeout:] 

Start configuration (Wired config).

Parameters
tokenToken
timeoutTimeout, default 100 seconds.

◆ startEZMultiConfigWiFiWithSsid:password:token:timeout: [1/2]

- (void) startEZMultiConfigWiFiWithSsid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Start EZ mode multi-device configuration network

Parameters
ssidName of route.
passwordPassword of route.
tokenConfig Token.
timeoutTimeout, default 100 seconds.

◆ startEZMultiConfigWiFiWithSsid:password:token:timeout: [2/2]

- (void) startEZMultiConfigWiFiWithSsid: (NSString *)  ssid
password: (NSString *)  password
token: (NSString *)  token
timeout: (NSTimeInterval)  timeout 

Start EZ mode multi-device configuration network

Parameters
ssidName of route.
passwordPassword of route.
tokenConfig Token.
timeoutTimeout, default 100 seconds.

◆ stopActiveSubDeviceWithGwId: [1/2]

- (void) stopActiveSubDeviceWithGwId: (NSString *)  gwId

Stop activate sub device with gateway ID.

Parameters
gwIdGateway Id

◆ stopActiveSubDeviceWithGwId: [2/2]

- (void) stopActiveSubDeviceWithGwId: (NSString *)  gwId

Stop activate sub device with gateway ID.

Parameters
gwIdGateway Id

◆ stopConfigWiFi [1/2]

- (void) stopConfigWiFi

Stop configuring the network.␛.

◆ stopConfigWiFi [2/2]

- (void) stopConfigWiFi

Stop configuring the network.␛.

Property Documentation

◆ delegate

- (id< ThingSmartActivatorDelegate >) delegate
readwritenonatomicweak

Definition at line 134 of file ThingSmartActivator.h.


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