Tuya iOS Smart Life App SDK 5.15.0
ThingSmartSDK Class Reference

ThingSmartSDK is an entry for using the Thing SDK. More...

#import <ThingSmartSDK.h>

Inheritance diagram for ThingSmartSDK:

Instance Methods

(void) - startWithAppKey:secretKey:
 
(void) - updateLatitude:longitude:
 
(void) - startWithAppKey:secretKey:
 
(void) - updateLatitude:longitude:
 
(void) - startWithAppKey:secretKey:
 
(void) - updateLatitude:longitude:
 
(void) - startWithAppKey:secretKey:
 
(void) - updateLatitude:longitude:
 
(void) - addNetworkRequestPriorityWithHighList:lowList:
 
(void) - addNetworkRequestPriorityWithHighList:lowList:
 
(void) - addNetworkRequestPriorityWithHighList:lowList:
 
(void) - addNetworkRequestPriorityWithHighList:lowList:
 
(void) - registerLiveActivityWithId:pushToken:completion:
 
(void) - registerLiveActivityWithId:pushToken:completion:
 
(void) - registerLiveActivityWithId:pushToken:completion:
 
(void) - registerLiveActivityWithId:pushToken:completion:
 
(void) - setDeviceToken:withError:
 
(void) - setDeviceToken:withError:
 
(void) - setDeviceToken:withError:
 
(void) - setDeviceToken:withError:
 
(void) - getPushStatusWithSuccess:failure:
 
(void) - getPushStatusWithSuccess:failure:
 
(void) - getPushStatusWithSuccess:failure:
 
(void) - getPushStatusWithSuccess:failure:
 
(void) - setPushStatusWithStatus:success:failure:
 
(void) - setPushStatusWithStatus:success:failure:
 
(void) - setPushStatusWithStatus:success:failure:
 
(void) - setPushStatusWithStatus:success:failure:
 
(void) - getDevicePushStatusWithSuccess:failure:
 
(void) - getDevicePushStatusWithSuccess:failure:
 
(void) - getDevicePushStatusWithSuccess:failure:
 
(void) - getDevicePushStatusWithSuccess:failure:
 
(void) - setDevicePushStatusWithStauts:success:failure:
 
(void) - setDevicePushStatusWithStauts:success:failure:
 
(void) - setDevicePushStatusWithStauts:success:failure:
 
(void) - setDevicePushStatusWithStauts:success:failure:
 
(void) - getFamilyPushStatusWithSuccess:failure:
 
(void) - getFamilyPushStatusWithSuccess:failure:
 
(void) - getFamilyPushStatusWithSuccess:failure:
 
(void) - getFamilyPushStatusWithSuccess:failure:
 
(void) - setFamilyPushStatusWithStauts:success:failure:
 
(void) - setFamilyPushStatusWithStauts:success:failure:
 
(void) - setFamilyPushStatusWithStauts:success:failure:
 
(void) - setFamilyPushStatusWithStauts:success:failure:
 
(void) - getNoticePushStatusWithSuccess:failure:
 
(void) - getNoticePushStatusWithSuccess:failure:
 
(void) - getNoticePushStatusWithSuccess:failure:
 
(void) - getNoticePushStatusWithSuccess:failure:
 
(void) - setNoticePushStatusWithStauts:success:failure:
 
(void) - setNoticePushStatusWithStauts:success:failure:
 
(void) - setNoticePushStatusWithStauts:success:failure:
 
(void) - setNoticePushStatusWithStauts:success:failure:
 
(void) - getMarketingPushStatusWithSuccess:failure:
 
(void) - getMarketingPushStatusWithSuccess:failure:
 
(void) - getMarketingPushStatusWithSuccess:failure:
 
(void) - getMarketingPushStatusWithSuccess:failure:
 
(void) - setMarketingPushStatusWithStauts:success:failure:
 
(void) - setMarketingPushStatusWithStauts:success:failure:
 
(void) - setMarketingPushStatusWithStauts:success:failure:
 
(void) - setMarketingPushStatusWithStauts:success:failure:
 
(BOOL) - checkVersionUpgrade
 
(BOOL) - checkVersionUpgrade
 
(BOOL) - checkVersionUpgrade
 
(BOOL) - checkVersionUpgrade
 
(void) - upgradeVersion:failure:
 
(void) - upgradeVersion:failure:
 
(void) - upgradeVersion:failure:
 
(void) - upgradeVersion:failure:
 

Class Methods

(instancetype) + sharedInstance
 Returns the singleton of the class. More...
 
(instancetype) + sharedInstance
 Returns the singleton of the class. More...
 
(instancetype) + sharedInstance
 Returns the singleton of the class. More...
 
(instancetype) + sharedInstance
 Returns the singleton of the class. More...
 
(void) + setCountryCode:
 
(void) + setCountryCode:
 
(void) + setCountryCode:
 
(void) + setCountryCode:
 
(NSString *) + getCountryCode
 
(NSString *) + getCountryCode
 
(NSString *) + getCountryCode
 
(NSString *) + getCountryCode
 
(NSString *) + getCountryNumWithCountryCode:
 
(NSString *) + getCountryNumWithCountryCode:
 
(NSString *) + getCountryNumWithCountryCode:
 
(NSString *) + getCountryNumWithCountryCode:
 

Properties

NSString * appGroupId
 
BOOL locationSwitch
 
double latitude
 Latitude of the location. More...
 
double longitude
 Longitude of the location. More...
 
ThingEnv env
 Server environment, defaults is ThingEnvRelease. Please do not set in production environment. More...
 
BOOL useSSLPinning
 Request need SSL Pinning, default is YES. More...
 
BOOL useHTTPSDNS
 Request need Https dns, default is NO. More...
 
BOOL removesKeysWithNullValues
 Whether to remove keys with NSNull values from response JSON. Defaults to YES. More...
 
NSString * appKey
 ThingSmart AppKey. More...
 
NSString * secretKey
 ThingSmart SecretKey. More...
 
NSString * channel
 Channel. More...
 
NSString * uuid
 UUID of the iOS/watchOS device. Will be created at app first launch. More...
 
NSString * appVersion
 App version, default value is from Info.plist -> CFBundleShortVersionString. More...
 
NSString * deviceProductName
 Device product name. For example: iPhone XS Max. More...
 
NSString * lang
 App SDK lang, default value is from mainBundle -> preferredLocalizations -> [0]. More...
 
NSString * appEnv
 
NSString * mbUrl
 
NSString * gwHost
 
NSString * mbHost
 
int port
 
BOOL useSSL
 
NSString * quicHost
 
int quicPort
 
BOOL useQUIC
 
NSString * appSupportUrl
 
NSString * regionCode
 
BOOL bExecNeutralDomain
 
BOOL autoSelectNetworkLink
 Low-latency network links are preferred, default is YES. More...
 
id< ThingSmartDomainConfigurabledomain
 
NSString * ecode
 
NSString * sid
 
id< ThingSmartSDKEventeventHandler
 
BOOL debugMode
 Debug mode, default is false. Verbose log will print into console if opened. More...
 
NSString * pushToken
 
NSData * deviceToken
 Pushes deviceToken. More...
 
NSData * voipToken
 voip More...
 

Detailed Description

ThingSmartSDK is an entry for using the Thing SDK.

Before using the SDK, please go to Thing IoT Platform (https://iot.thing.com) create a SDK App. We need 4 things from the Platform to initialize the SDK:

  • Thing App Key.
  • Thing App Secret.
  • Security Image. Rename to t_s.bmp and put it in your project as a resource.
  • Bundle ID. Must equal to your App's bundle ID.

If you need to set some params (appGroupId, env, appVersion, lang, etc...) in this class, be sure to set them before initialize the SDK.

Finally, call this method to initialize the SDK: [sharedInstance (ThingSmartSDK) startWithAppKey:@"YOUR_APP_KEY" secretKey:@"YOUR_APP_SECRET"];.

Definition at line 38 of file ThingSmartSDK.h.

Method Documentation

◆ addNetworkRequestPriorityWithHighList:lowList: [1/4]

- (void) addNetworkRequestPriorityWithHighList: (NSArray *)  highList
lowList: (NSArray *)  lowList 

Set network interface request priority.

  • Parameters:
    • highList: high priority request api list
    • lowList: low priority request api list

Provided by category ThingSmartSDK(CountryCode).

◆ addNetworkRequestPriorityWithHighList:lowList: [2/4]

- (void) addNetworkRequestPriorityWithHighList: (NSArray *)  highList
lowList: (NSArray *)  lowList 

Set network interface request priority.

  • Parameters:
    • highList: high priority request api list
    • lowList: low priority request api list

Provided by category ThingSmartSDK(CountryCode).

◆ addNetworkRequestPriorityWithHighList:lowList: [3/4]

- (void) addNetworkRequestPriorityWithHighList: (NSArray *)  highList
lowList: (NSArray *)  lowList 

Set network interface request priority.

  • Parameters:
    • highList: high priority request api list
    • lowList: low priority request api list

Provided by category ThingSmartSDK(CountryCode).

◆ addNetworkRequestPriorityWithHighList:lowList: [4/4]

- (void) addNetworkRequestPriorityWithHighList: (NSArray *)  highList
lowList: (NSArray *)  lowList 

Set network interface request priority.

  • Parameters:
    • highList: high priority request api list
    • lowList: low priority request api list

Provided by category ThingSmartSDK(CountryCode).

◆ checkVersionUpgrade [1/4]

- (BOOL) checkVersionUpgrade

Check if ThingSmartKit need to be upgrade to ThingSmartHomeKit.

Returns
Whether need to upgrade data.

Provided by category ThingSmartSDK(Upgrade).

◆ checkVersionUpgrade [2/4]

- (BOOL) checkVersionUpgrade

Check if ThingSmartKit need to be upgrade to ThingSmartHomeKit.

Returns
Whether need to upgrade data.

Provided by category ThingSmartSDK(Upgrade).

◆ checkVersionUpgrade [3/4]

- (BOOL) checkVersionUpgrade

Check if ThingSmartKit need to be upgrade to ThingSmartHomeKit.

Returns
Whether need to upgrade data.

Provided by category ThingSmartSDK(Upgrade).

◆ checkVersionUpgrade [4/4]

- (BOOL) checkVersionUpgrade

Check if ThingSmartKit need to be upgrade to ThingSmartHomeKit.

Returns
Whether need to upgrade data.

Provided by category ThingSmartSDK(Upgrade).

◆ getCountryCode [1/4]

+ (NSString *) getCountryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryCode [2/4]

+ (NSString *) getCountryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryCode [3/4]

+ (NSString *) getCountryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryCode [4/4]

+ (NSString *) getCountryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryNumWithCountryCode: [1/4]

+ (NSString *) getCountryNumWithCountryCode: (NSString *)  countryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryNumWithCountryCode: [2/4]

+ (NSString *) getCountryNumWithCountryCode: (NSString *)  countryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryNumWithCountryCode: [3/4]

+ (NSString *) getCountryNumWithCountryCode: (NSString *)  countryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getCountryNumWithCountryCode: [4/4]

+ (NSString *) getCountryNumWithCountryCode: (NSString *)  countryCode

Provided by category ThingSmartSDK(CountryCode).

◆ getDevicePushStatusWithSuccess:failure: [1/4]

- (void) getDevicePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether device alert notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getDevicePushStatusWithSuccess:failure: [2/4]

- (void) getDevicePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether device alert notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getDevicePushStatusWithSuccess:failure: [3/4]

- (void) getDevicePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether device alert notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getDevicePushStatusWithSuccess:failure: [4/4]

- (void) getDevicePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether device alert notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getFamilyPushStatusWithSuccess:failure: [1/4]

- (void) getFamilyPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app home notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getFamilyPushStatusWithSuccess:failure: [2/4]

- (void) getFamilyPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app home notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getFamilyPushStatusWithSuccess:failure: [3/4]

- (void) getFamilyPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app home notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getFamilyPushStatusWithSuccess:failure: [4/4]

- (void) getFamilyPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app home notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getMarketingPushStatusWithSuccess:failure: [1/4]

- (void) getMarketingPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app marketing messages are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getMarketingPushStatusWithSuccess:failure: [2/4]

- (void) getMarketingPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app marketing messages are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getMarketingPushStatusWithSuccess:failure: [3/4]

- (void) getMarketingPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app marketing messages are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getMarketingPushStatusWithSuccess:failure: [4/4]

- (void) getMarketingPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app marketing messages are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getNoticePushStatusWithSuccess:failure: [1/4]

- (void) getNoticePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app message notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getNoticePushStatusWithSuccess:failure: [2/4]

- (void) getNoticePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app message notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getNoticePushStatusWithSuccess:failure: [3/4]

- (void) getNoticePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app message notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getNoticePushStatusWithSuccess:failure: [4/4]

- (void) getNoticePushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether app message notifications are enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getPushStatusWithSuccess:failure: [1/4]

- (void) getPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether the app messages pushing function is enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getPushStatusWithSuccess:failure: [2/4]

- (void) getPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether the app messages pushing function is enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getPushStatusWithSuccess:failure: [3/4]

- (void) getPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether the app messages pushing function is enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ getPushStatusWithSuccess:failure: [4/4]

- (void) getPushStatusWithSuccess: (__nullable ThingSuccessBOOL success
failure: (__nullable ThingFailureError failure 

Indicates whether the app messages pushing function is enabled.

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

Provided by category ThingSmartSDK(PushNotification).

◆ registerLiveActivityWithId:pushToken:completion: [1/4]

- (void) registerLiveActivityWithId: (NSString *)  activityId
pushToken: (NSData *)  token
completion: (void(^)(NSError *_Nullable error))  completion 

Provided by category ThingSmartSDK(LiveActivity).

◆ registerLiveActivityWithId:pushToken:completion: [2/4]

- (void) registerLiveActivityWithId: (NSString *)  activityId
pushToken: (NSData *)  token
completion: (void(^)(NSError *_Nullable error))  completion 

Provided by category ThingSmartSDK(LiveActivity).

◆ registerLiveActivityWithId:pushToken:completion: [3/4]

- (void) registerLiveActivityWithId: (NSString *)  activityId
pushToken: (NSData *)  token
completion: (void(^)(NSError *_Nullable error))  completion 

Provided by category ThingSmartSDK(LiveActivity).

◆ registerLiveActivityWithId:pushToken:completion: [4/4]

- (void) registerLiveActivityWithId: (NSString *)  activityId
pushToken: (NSData *)  token
completion: (void(^)(NSError *_Nullable error))  completion 

Provided by category ThingSmartSDK(LiveActivity).

◆ setCountryCode: [1/4]

+ (void) setCountryCode: (NSString *)  countryCode

Set env to this country code

Parameters
countryCodelink 86 for china

Provided by category ThingSmartSDK(CountryCode).

◆ setCountryCode: [2/4]

+ (void) setCountryCode: (NSString *)  countryCode

Set env to this country code

Parameters
countryCodelink 86 for china

Provided by category ThingSmartSDK(CountryCode).

◆ setCountryCode: [3/4]

+ (void) setCountryCode: (NSString *)  countryCode

Set env to this country code

Parameters
countryCodelink 86 for china

Provided by category ThingSmartSDK(CountryCode).

◆ setCountryCode: [4/4]

+ (void) setCountryCode: (NSString *)  countryCode

Set env to this country code

Parameters
countryCodelink 86 for china

Provided by category ThingSmartSDK(CountryCode).

◆ setDevicePushStatusWithStauts:success:failure: [1/4]

- (void) setDevicePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app device alert pushing messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setDevicePushStatusWithStauts:success:failure: [2/4]

- (void) setDevicePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app device alert pushing messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setDevicePushStatusWithStauts:success:failure: [3/4]

- (void) setDevicePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app device alert pushing messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setDevicePushStatusWithStauts:success:failure: [4/4]

- (void) setDevicePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app device alert pushing messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setDeviceToken:withError: [1/4]

- (void) setDeviceToken: (nullable NSData *)  token
withError: (nullable NSError *)  error 

Sets the device token pushing and error information.

Parameters
tokenThe device token.
errorAn error occurs while processing the request.

Provided by category ThingSmartSDK(PushNotification).

◆ setDeviceToken:withError: [2/4]

- (void) setDeviceToken: (nullable NSData *)  token
withError: (nullable NSError *)  error 

Sets the device token pushing and error information.

Parameters
tokenThe device token.
errorAn error occurs while processing the request.

Provided by category ThingSmartSDK(PushNotification).

◆ setDeviceToken:withError: [3/4]

- (void) setDeviceToken: (nullable NSData *)  token
withError: (nullable NSError *)  error 

Sets the device token pushing and error information.

Parameters
tokenThe device token.
errorAn error occurs while processing the request.

Provided by category ThingSmartSDK(PushNotification).

◆ setDeviceToken:withError: [4/4]

- (void) setDeviceToken: (nullable NSData *)  token
withError: (nullable NSError *)  error 

Sets the device token pushing and error information.

Parameters
tokenThe device token.
errorAn error occurs while processing the request.

Provided by category ThingSmartSDK(PushNotification).

◆ setFamilyPushStatusWithStauts:success:failure: [1/4]

- (void) setFamilyPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app home push messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setFamilyPushStatusWithStauts:success:failure: [2/4]

- (void) setFamilyPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app home push messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setFamilyPushStatusWithStauts:success:failure: [3/4]

- (void) setFamilyPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app home push messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setFamilyPushStatusWithStauts:success:failure: [4/4]

- (void) setFamilyPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app home push messages.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setMarketingPushStatusWithStauts:success:failure: [1/4]

- (void) setMarketingPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app marketing message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setMarketingPushStatusWithStauts:success:failure: [2/4]

- (void) setMarketingPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app marketing message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setMarketingPushStatusWithStauts:success:failure: [3/4]

- (void) setMarketingPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app marketing message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setMarketingPushStatusWithStauts:success:failure: [4/4]

- (void) setMarketingPushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app marketing message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setNoticePushStatusWithStauts:success:failure: [1/4]

- (void) setNoticePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setNoticePushStatusWithStauts:success:failure: [2/4]

- (void) setNoticePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setNoticePushStatusWithStauts:success:failure: [3/4]

- (void) setNoticePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setNoticePushStatusWithStauts:success:failure: [4/4]

- (void) setNoticePushStatusWithStauts: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableSpecifies whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setPushStatusWithStatus:success:failure: [1/4]

- (void) setPushStatusWithStatus: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableA Boolean value indicates whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setPushStatusWithStatus:success:failure: [2/4]

- (void) setPushStatusWithStatus: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableA Boolean value indicates whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setPushStatusWithStatus:success:failure: [3/4]

- (void) setPushStatusWithStatus: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableA Boolean value indicates whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ setPushStatusWithStatus:success:failure: [4/4]

- (void) setPushStatusWithStatus: (BOOL)  enable
success: (__nullable ThingSuccessHandler success
failure: (__nullable ThingFailureError failure 

Enables or disables app message pushing.

Parameters
enableA Boolean value indicates whether to enable or disable the function.
successCalled when the task is finished.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(PushNotification).

◆ sharedInstance [1/4]

+ (instancetype) sharedInstance

Returns the singleton of the class.

◆ sharedInstance [2/4]

+ (instancetype) sharedInstance

Returns the singleton of the class.

◆ sharedInstance [3/4]

+ (instancetype) sharedInstance

Returns the singleton of the class.

◆ sharedInstance [4/4]

+ (instancetype) sharedInstance

Returns the singleton of the class.

◆ startWithAppKey:secretKey: [1/4]

- (void) startWithAppKey: (NSString *)  appKey
secretKey: (NSString *)  secretKey 

Initialize ThingSmart SDK.

Parameters
appKeyThingSmart AppKey.
secretKeyThingSmart SecretKey.

◆ startWithAppKey:secretKey: [2/4]

- (void) startWithAppKey: (NSString *)  appKey
secretKey: (NSString *)  secretKey 

Initialize ThingSmart SDK.

Parameters
appKeyThingSmart AppKey.
secretKeyThingSmart SecretKey.

◆ startWithAppKey:secretKey: [3/4]

- (void) startWithAppKey: (NSString *)  appKey
secretKey: (NSString *)  secretKey 

Initialize ThingSmart SDK.

Parameters
appKeyThingSmart AppKey.
secretKeyThingSmart SecretKey.

◆ startWithAppKey:secretKey: [4/4]

- (void) startWithAppKey: (NSString *)  appKey
secretKey: (NSString *)  secretKey 

Initialize ThingSmart SDK.

Parameters
appKeyThingSmart AppKey.
secretKeyThingSmart SecretKey.

◆ updateLatitude:longitude: [1/4]

- (void) updateLatitude: (double)  latitude
longitude: (double)  longitude 

Report location if needed.

Parameters
latitudeLatitude.
longitudeLongitude.

◆ updateLatitude:longitude: [2/4]

- (void) updateLatitude: (double)  latitude
longitude: (double)  longitude 

Report location if needed.

Parameters
latitudeLatitude.
longitudeLongitude.

◆ updateLatitude:longitude: [3/4]

- (void) updateLatitude: (double)  latitude
longitude: (double)  longitude 

Report location if needed.

Parameters
latitudeLatitude.
longitudeLongitude.

◆ updateLatitude:longitude: [4/4]

- (void) updateLatitude: (double)  latitude
longitude: (double)  longitude 

Report location if needed.

Parameters
latitudeLatitude.
longitudeLongitude.

◆ upgradeVersion:failure: [1/4]

- (void) upgradeVersion: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

SDK data upgrade.

Parameters
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(Upgrade).

◆ upgradeVersion:failure: [2/4]

- (void) upgradeVersion: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

SDK data upgrade.

Parameters
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(Upgrade).

◆ upgradeVersion:failure: [3/4]

- (void) upgradeVersion: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

SDK data upgrade.

Parameters
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(Upgrade).

◆ upgradeVersion:failure: [4/4]

- (void) upgradeVersion: (nullable ThingSuccessHandler success
failure: (nullable ThingFailureError failure 

SDK data upgrade.

Parameters
successCalled when the task finishes successfully.
failureCalled when the task is interrupted by an error.

Provided by category ThingSmartSDK(Upgrade).

Property Documentation

◆ appEnv

- (NSString *) appEnv
readnonatomicstrong

Definition at line 91 of file ThingSmartSDK.h.

◆ appGroupId

- (NSString *) appGroupId
readwritenonatomicstrong

Application group identifier. If you want to use the SDK in app extension, set appGroupId before SDK initialized both in app & app extension.

Definition at line 45 of file ThingSmartSDK.h.

◆ appKey

- (NSString *) appKey
readnonatomicstrong

ThingSmart AppKey.

Definition at line 71 of file ThingSmartSDK.h.

◆ appSupportUrl

- (NSString *) appSupportUrl
readnonatomicstrong

Definition at line 104 of file ThingSmartSDK.h.

◆ appVersion

- (NSString *) appVersion
readwritenonatomicstrong

App version, default value is from Info.plist -> CFBundleShortVersionString.

Definition at line 83 of file ThingSmartSDK.h.

◆ autoSelectNetworkLink

- (BOOL) autoSelectNetworkLink
readwritenonatomicassign

Low-latency network links are preferred, default is YES.

Definition at line 110 of file ThingSmartSDK.h.

◆ bExecNeutralDomain

- (BOOL) bExecNeutralDomain
readwritenonatomicassign

Definition at line 107 of file ThingSmartSDK.h.

◆ channel

- (NSString *) channel
readwritenonatomicstrong

Channel.

Definition at line 77 of file ThingSmartSDK.h.

◆ debugMode

- (BOOL) debugMode
readwritenonatomicassign

Debug mode, default is false. Verbose log will print into console if opened.

Provided by category ThingSmartSDK(Log).

Definition at line 18 of file ThingSmartSDK+Log.h.

◆ deviceProductName

- (NSString *) deviceProductName
readwritenonatomicstrong

Device product name. For example: iPhone XS Max.

Definition at line 86 of file ThingSmartSDK.h.

◆ deviceToken

- (NSData*) deviceToken
readwritenonatomicstrong

Pushes deviceToken.

Provided by category ThingSmartSDK(PushNotification).

Definition at line 19 of file ThingSmartSDK+PushNotification.h.

◆ domain

- (id< ThingSmartDomainConfigurable >) domain
readnonatomicstrong

Provided by category ThingSmartSDK(DomainConfigurable).

Definition at line 32 of file ThingSmartDomainConfigurable.h.

◆ ecode

- (NSString *) ecode
readnonatomicstrong

Provided by category ThingSmartSDK(DomainConfigurable).

Definition at line 34 of file ThingSmartDomainConfigurable.h.

◆ env

- (ThingEnv) env
readwritenonatomicassign

Server environment, defaults is ThingEnvRelease. Please do not set in production environment.

Definition at line 59 of file ThingSmartSDK.h.

◆ eventHandler

- (id< ThingSmartSDKEvent >) eventHandler
readnonatomicstrong

Provided by category ThingSmartSDK(Event).

Definition at line 49 of file ThingSmartDomainConfigurable.h.

◆ gwHost

- (NSString *) gwHost
readnonatomicstrong

Definition at line 95 of file ThingSmartSDK.h.

◆ lang

- (NSString *) lang
readwritenonatomicstrong

App SDK lang, default value is from mainBundle -> preferredLocalizations -> [0].

Definition at line 89 of file ThingSmartSDK.h.

◆ latitude

- (double) latitude
readwritenonatomicassign

Latitude of the location.

Definition at line 53 of file ThingSmartSDK.h.

◆ locationSwitch

- (BOOL) locationSwitch
readwritenonatomicassign

Positioning switch. True means include latitude and longitude in common parameters, while false means no include. Default is true.

Definition at line 50 of file ThingSmartSDK.h.

◆ longitude

- (double) longitude
readwritenonatomicassign

Longitude of the location.

Definition at line 56 of file ThingSmartSDK.h.

◆ mbHost

- (NSString *) mbHost
readnonatomicstrong

Definition at line 96 of file ThingSmartSDK.h.

◆ mbUrl

- (NSString *) mbUrl
readnonatomicstrong

Definition at line 93 of file ThingSmartSDK.h.

◆ port

- (int) port
readnonatomicassign

Definition at line 97 of file ThingSmartSDK.h.

◆ pushToken

- (NSString*) pushToken
readwritenonatomicstrong

Pushes a token.

Deprecated:
Use +[ThingSmartSDK sharedInstance].deviceToken instead.

Pushes a token.

Deprecated:
Use +[ThingSmartSDK sharedInstance].deviceToken instead.

Pushes a token.

Deprecated:
Use +[ThingSmartSDK sharedInstance].deviceToken instead.

Pushes a token.

Deprecated:
Use +[ThingSmartSDK sharedInstance].deviceToken instead.

Provided by category ThingSmartSDK(PushNotification).

Definition at line 16 of file ThingSmartSDK+PushNotification.h.

◆ quicHost

- (NSString *) quicHost
readnonatomicstrong

Definition at line 100 of file ThingSmartSDK.h.

◆ quicPort

- (int) quicPort
readnonatomicassign

Definition at line 101 of file ThingSmartSDK.h.

◆ regionCode

- (NSString *) regionCode
readnonatomicstrong

Definition at line 105 of file ThingSmartSDK.h.

◆ removesKeysWithNullValues

- (BOOL) removesKeysWithNullValues
readwritenonatomicassign

Whether to remove keys with NSNull values from response JSON. Defaults to YES.

Definition at line 68 of file ThingSmartSDK.h.

◆ secretKey

- (NSString *) secretKey
readnonatomicstrong

ThingSmart SecretKey.

Definition at line 74 of file ThingSmartSDK.h.

◆ sid

- (NSString *) sid
readnonatomicstrong

Provided by category ThingSmartSDK(DomainConfigurable).

Definition at line 35 of file ThingSmartDomainConfigurable.h.

◆ useHTTPSDNS

- (BOOL) useHTTPSDNS
readwritenonatomicassign

Request need Https dns, default is NO.

Definition at line 65 of file ThingSmartSDK.h.

◆ useQUIC

- (BOOL) useQUIC
readnonatomicassign

Definition at line 102 of file ThingSmartSDK.h.

◆ useSSL

- (BOOL) useSSL
readnonatomicassign

Definition at line 98 of file ThingSmartSDK.h.

◆ useSSLPinning

- (BOOL) useSSLPinning
readwritenonatomicassign

Request need SSL Pinning, default is YES.

Definition at line 62 of file ThingSmartSDK.h.

◆ uuid

- (NSString *) uuid
readnonatomicstrong

UUID of the iOS/watchOS device. Will be created at app first launch.

Definition at line 80 of file ThingSmartSDK.h.

◆ voipToken

- (NSData*) voipToken
readwritenonatomicstrong

voip

Provided by category ThingSmartSDK(Voip).

Definition at line 15 of file ThingSmartSDK+Voip.h.


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