Tuya iOS Smart Life App SDK 5.15.0
WTLSetupPayload Class Reference

#import <WTLSetupPayload.h>

Inheritance diagram for WTLSetupPayload:

Instance Methods

(WTLDiscoveryCapabilities discoveryCapabilities) - API_AVAILABLE
 
(NSNumber *setupPasscode) - API_AVAILABLE
 
(NSArray< WTLOptionalQRCodeInfo * > *_Nullable) - getAllOptionalVendorData:
 
(instancetype) - initWithSetupPasscode:discriminator:
 
(NSString *_Nullable) - manualEntryCode
 
(NSString *_Nullable) - qrCodeString:
 
(NSNumber *rendezvousInformation) - WTL_DEPRECATED
 
(NSNumber *setUpPINCode) - WTL_DEPRECATED
 

Class Methods

(NSUInteger) + generateRandomPIN
 
(16.2) + tvos
 
(WTLSetupPayload *_Nullable) + setupPayloadWithOnboardingPayload:error:
 

Properties

NSNumber * version
 
NSNumber * vendorID
 
NSNumber * productID
 
WTLCommissioningFlow commissioningFlow
 
NSArray< WTLOptionalQRCodeInfo * > * allQRCodeInfoArray
 
NSNumber * discriminator
 
BOOL hasShortDiscriminator
 
NSString * serialNumber
 

Detailed Description

A setup payload that can be created from a numeric code or QR code and serialized to a numeric code or QR code, though serializing to QR code after creating from numeric code will not work, because some required information will be missing.

Definition at line 77 of file WTLSetupPayload.h.

Method Documentation

◆ API_AVAILABLE [1/2]

- (WTLDiscoveryCapabilities discoveryCapabilities) API_AVAILABLE (macos(13.3)) 
(watchos(9.4)) 
(tvos(16.4))   

The value of discoveryCapabilities is made up of the various WTLDiscoveryCapabilities flags. If the discovery capabilities are not known, this will be set to WTLDiscoveryCapabilitiesUnknown.

◆ API_AVAILABLE [2/2]

- (NSNumber *setupPasscode) API_AVAILABLE (macos(13.3)) 
(watchos(9.4)) 
(tvos(16.4))   

◆ generateRandomPIN

+ (NSUInteger) generateRandomPIN

Generate a random Matter-valid setup PIN.

◆ getAllOptionalVendorData:

- (NSArray< WTLOptionalQRCodeInfo * > *_Nullable) getAllOptionalVendorData: (NSError *__autoreleasing *)  error

◆ initWithSetupPasscode:discriminator:

- (instancetype) initWithSetupPasscode: (NSNumber *)  setupPasscode
discriminator: (macos(13.1)) 
(watchos(9.2)) 
(tvos(16.2))  API_AVAILABLE 

Initialize an WTLSetupPayload with the given passcode and discriminator. This will pre-set version, product id, and vendor id to 0.

◆ manualEntryCode

- (NSString *_Nullable) manualEntryCode

Get 11 digit manual entry code from the setup payload.

◆ qrCodeString:

- (NSString *_Nullable) qrCodeString: (macos(13.1)) 
(watchos(9.2)) 
(tvos(16.2))  API_AVAILABLE 

Get a QR code from the setup payload.

Returns nil on failure (e.g. if the setup payload does not have all the information a QR code needs).

◆ setupPayloadWithOnboardingPayload:error:

+ (WTLSetupPayload *_Nullable) setupPayloadWithOnboardingPayload: (NSString *)  onboardingPayload
error: (macos(13.1)) 
(watchos(9.2)) 
(tvos(16.2))  API_AVAILABLE 

Create an WTLSetupPayload with the given onboarding payload.

Will return nil on errors (e.g. if the onboarding payload cannot be parsed).

◆ tvos

+ (16.2) tvos

Generate a random Matter-valid setup passcode.

Provided by category WTLSetupPayload(Deprecated).

◆ WTL_DEPRECATED [1/2]

- (NSNumber *rendezvousInformation) WTL_DEPRECATED ("Please use discoveryCapabilities") 
(macos(13.0, 13.3)) 
(watchos(9.1, 9.4)) 
(tvos(16.1, 16.4))   

Provided by category WTLSetupPayload(Deprecated).

◆ WTL_DEPRECATED [2/2]

- (NSNumber *setUpPINCode) WTL_DEPRECATED ("Please use setupPasscode") 
(macos(13.0, 13.3)) 
(watchos(9.1, 9.4)) 
(tvos(16.1, 16.4))   

Provided by category WTLSetupPayload(Deprecated).

Property Documentation

◆ allQRCodeInfoArray

- (NSArray<WTLOptionalQRCodeInfo *>*) allQRCodeInfoArray
readwritenonatomicstrong

Definition at line 84 of file WTLSetupPayload.h.

◆ commissioningFlow

- (WTLCommissioningFlow) commissioningFlow
readwritenonatomicassign

Definition at line 82 of file WTLSetupPayload.h.

◆ discriminator

- (NSNumber*) discriminator
readwritenonatomiccopy

Definition at line 93 of file WTLSetupPayload.h.

◆ hasShortDiscriminator

- (BOOL) hasShortDiscriminator
readwritenonatomicassign

If hasShortDiscriminator is true, the discriminator value contains just the high 4 bits of the full discriminator. For example, if hasShortDiscriminator is true and discriminator is 0xA, then the full discriminator can be anything in the range 0xA00 t0 0xAFF.

Definition at line 101 of file WTLSetupPayload.h.

◆ productID

- (NSNumber*) productID
readwritenonatomiccopy

Definition at line 81 of file WTLSetupPayload.h.

◆ serialNumber

- (NSString*) serialNumber
readwritenonatomiccopy

Definition at line 104 of file WTLSetupPayload.h.

◆ vendorID

- (NSNumber*) vendorID
readwritenonatomiccopy

Definition at line 80 of file WTLSetupPayload.h.

◆ version

- (NSNumber*) version
readwritenonatomiccopy

Definition at line 79 of file WTLSetupPayload.h.


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