Tuya iOS Smart Life App SDK 5.15.0
ThingSmartFamilyBiz Class Reference

#import <ThingSmartFamilyBiz.h>

Inheritance diagram for ThingSmartFamilyBiz:

Instance Methods

(instancetype) - NS_UNAVAILABLE
 
(void) - addObserver:
 
(void) - removeObserver:
 
(long long) - getCurrentFamilyId
 
(ThingSmartHomeModel *_Nullable) - getCurrentFamily
 
(void) - setCurrentFamilyId:
 
(void) - launchCurrentFamilyWithAppGroupName:
 
(void) - clearCurrentFamily
 
(NSArray< ThingSmartHomeModel * > *) - getCachedHomes
 
(void) - getFamilyListWithSuccess:failure:
 
(void) - getFamilyDetailWithHomeId:success:failure:
 
(void) - createDefaultFamilyWithName:success:failure:
 
(void) - addFamilyWithModel:success:failure:
 
(void) - deleteFamilyWithHomeId:success:failure:
 
(void) - updateFamilyWithHomeId:model:success:failure:
 
(void) - getCityInfo:longitude:success:failure:
 
(void) - leaveFamilyWithHomeId:memberId:success:failure:
 
(void) - joinFamilyWithInvitationCode:success:failure:
 
(void) - acceptJoinFamilyWithHomeId:success:failure:
 
(void) - rejectJoinFamilyWithHomeId:success:failure:
 
(void) - getHomeWeatherSketchWithHomeId:success:failure:
 
(void) - getHomeWeatherDetailWithHomeId:option:success:failure:
 
(void) - sortDeviceOrGroupWithHomeId:orderList:success:failure:
 
(instancetype) - NS_UNAVAILABLE
 
(void) - addObserver:
 
(void) - removeObserver:
 
(long long) - getCurrentFamilyId
 
(ThingSmartHomeModel *_Nullable) - getCurrentFamily
 
(void) - setCurrentFamilyId:
 
(void) - launchCurrentFamilyWithAppGroupName:
 
(void) - clearCurrentFamily
 
(NSArray< ThingSmartHomeModel * > *) - getCachedHomes
 
(void) - getFamilyListWithSuccess:failure:
 
(void) - getFamilyDetailWithHomeId:success:failure:
 
(void) - createDefaultFamilyWithName:success:failure:
 
(void) - addFamilyWithModel:success:failure:
 
(void) - deleteFamilyWithHomeId:success:failure:
 
(void) - updateFamilyWithHomeId:model:success:failure:
 
(void) - getCityInfo:longitude:success:failure:
 
(void) - leaveFamilyWithHomeId:memberId:success:failure:
 
(void) - joinFamilyWithInvitationCode:success:failure:
 
(void) - acceptJoinFamilyWithHomeId:success:failure:
 
(void) - rejectJoinFamilyWithHomeId:success:failure:
 
(void) - getHomeWeatherSketchWithHomeId:success:failure:
 
(void) - getHomeWeatherDetailWithHomeId:option:success:failure:
 
(void) - sortDeviceOrGroupWithHomeId:orderList:success:failure:
 

Class Methods

(instancetype) + sharedInstance
 
(instancetype) + NS_UNAVAILABLE
 
(instancetype) + sharedInstance
 
(instancetype) + NS_UNAVAILABLE
 

Detailed Description

Definition at line 120 of file ThingSmartFamilyBiz.h.

Method Documentation

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

- (void) acceptJoinFamilyWithHomeId: (long long)  homeId
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Accepting an invitation to join a family

Parameters
homeIdID of the family invited to join
successSuccess callback
failureFailure callback

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

- (void) acceptJoinFamilyWithHomeId: (long long)  homeId
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Accepting an invitation to join a family

Parameters
homeIdID of the family invited to join
successSuccess callback
failureFailure callback

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

- (void) addFamilyWithModel: (ThingSmartFamilyRequestModel *)  model
success: (void(^)(long long homeId))  success
failure: (ThingFailureError failure 

Add Family

Parameters
modelRequest Model of Adding a Family
successSuccess callback
failureFailure callback

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

- (void) addFamilyWithModel: (ThingSmartFamilyRequestModel *)  model
success: (void(^)(long long homeId))  success
failure: (ThingFailureError failure 

Add Family

Parameters
modelRequest Model of Adding a Family
successSuccess callback
failureFailure callback

◆ addObserver: [1/2]

- (void) addObserver: (id< ThingSmartFamilyBizDelegate >)  observer

Adding a Listener

Parameters
observerImplementation ThingSmartFamilyBizDelegate protocol

◆ addObserver: [2/2]

- (void) addObserver: (id< ThingSmartFamilyBizDelegate >)  observer

Adding a Listener

Parameters
observerImplementation ThingSmartFamilyBizDelegate protocol

◆ clearCurrentFamily [1/2]

- (void) clearCurrentFamily

Empty the current family cache

◆ clearCurrentFamily [2/2]

- (void) clearCurrentFamily

Empty the current family cache

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

- (void) createDefaultFamilyWithName: (NSString *)  name
success: (void(^)(long long homeId))  success
failure: (ThingFailureError failure 

Creating a Default Family

Parameters
nameFamily name
successSuccess callback
failureFailure callback

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

- (void) createDefaultFamilyWithName: (NSString *)  name
success: (void(^)(long long homeId))  success
failure: (ThingFailureError failure 

Creating a Default Family

Parameters
nameFamily name
successSuccess callback
failureFailure callback

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

- (void) deleteFamilyWithHomeId: (long long)  homeId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Delete family

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

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

- (void) deleteFamilyWithHomeId: (long long)  homeId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Delete family

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

◆ getCachedHomes [1/2]

- (NSArray< ThingSmartHomeModel * > *) getCachedHomes

Get a cached list of families

Returns
Array of homeModel @discussion Cached family data is only available after calling [ThingSmartFamilyBiz getFamilyListWithSuccess:failure:]

◆ getCachedHomes [2/2]

- (NSArray< ThingSmartHomeModel * > *) getCachedHomes

Get a cached list of families

Returns
Array of homeModel @discussion Cached family data is only available after calling [ThingSmartFamilyBiz getFamilyListWithSuccess:failure:]

◆ getCityInfo:longitude:success:failure: [1/2]

- (void) getCityInfo: (double)  latitude
longitude: (double)  longitude
success: (void(^)(ThingSmartFamilyCityModel *cityModel))  success
failure: (ThingFailureError failure 

Get information about the city where your family lives

Parameters
latitudeLatitude where the family is located
longitudeLongitude where the family is located
successSuccess callback
failureFailure callback

◆ getCityInfo:longitude:success:failure: [2/2]

- (void) getCityInfo: (double)  latitude
longitude: (double)  longitude
success: (void(^)(ThingSmartFamilyCityModel *cityModel))  success
failure: (ThingFailureError failure 

Get information about the city where your family lives

Parameters
latitudeLatitude where the family is located
longitudeLongitude where the family is located
successSuccess callback
failureFailure callback

◆ getCurrentFamily [1/2]

- (ThingSmartHomeModel *_Nullable) getCurrentFamily

Get the current family model

Returns
homeModel of current family

◆ getCurrentFamily [2/2]

- (ThingSmartHomeModel *_Nullable) getCurrentFamily

Get the current family model

Returns
homeModel of current family

◆ getCurrentFamilyId [1/2]

- (long long) getCurrentFamilyId

Get current family ID

Returns
homeId

◆ getCurrentFamilyId [2/2]

- (long long) getCurrentFamilyId

Get current family ID

Returns
homeId

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

- (void) getFamilyDetailWithHomeId: (long long)  homeId
success: (void(^)(ThingSmartHome *home))  success
failure: (ThingFailureError failure 

Get family details

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

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

- (void) getFamilyDetailWithHomeId: (long long)  homeId
success: (void(^)(ThingSmartHome *home))  success
failure: (ThingFailureError failure 

Get family details

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

◆ getFamilyListWithSuccess:failure: [1/2]

- (void) getFamilyListWithSuccess: (void(^)(NSArray< ThingSmartHomeModel * > *homes))  success
failure: (ThingFailureError failure 

Get a rough list of family information

Parameters
successSuccess callback
failureFailure callback

◆ getFamilyListWithSuccess:failure: [2/2]

- (void) getFamilyListWithSuccess: (void(^)(NSArray< ThingSmartHomeModel * > *homes))  success
failure: (ThingFailureError failure 

Get a rough list of family information

Parameters
successSuccess callback
failureFailure callback

◆ getHomeWeatherDetailWithHomeId:option:success:failure: [1/2]

- (void) getHomeWeatherDetailWithHomeId: (long long)  homeId
option: (ThingSmartWeatherOptionModel *)  optionModel
success: (void(^)(NSArray< ThingSmartWeatherModel * > *))  success
failure: (ThingFailureError failure 

Get detailed information about the weather in your home area

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

◆ getHomeWeatherDetailWithHomeId:option:success:failure: [2/2]

- (void) getHomeWeatherDetailWithHomeId: (long long)  homeId
option: (ThingSmartWeatherOptionModel *)  optionModel
success: (void(^)(NSArray< ThingSmartWeatherModel * > *))  success
failure: (ThingFailureError failure 

Get detailed information about the weather in your home area

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

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

- (void) getHomeWeatherSketchWithHomeId: (long long)  homeId
success: (void(^)(ThingSmartWeatherSketchModel *))  success
failure: (ThingFailureError failure 

Get rough information about the weather in your home area

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

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

- (void) getHomeWeatherSketchWithHomeId: (long long)  homeId
success: (void(^)(ThingSmartWeatherSketchModel *))  success
failure: (ThingFailureError failure 

Get rough information about the weather in your home area

Parameters
homeIdFamily ID
successSuccess callback
failureFailure callback

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

- (void) joinFamilyWithInvitationCode: (NSString *)  invitationCode
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Join the family by invitation code

Parameters
invitationCodeInvitation code
successSuccess callback
failureFailure callback

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

- (void) joinFamilyWithInvitationCode: (NSString *)  invitationCode
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Join the family by invitation code

Parameters
invitationCodeInvitation code
successSuccess callback
failureFailure callback

◆ launchCurrentFamilyWithAppGroupName: [1/2]

- (void) launchCurrentFamilyWithAppGroupName: (NSString *_Nullable)  appGroupName

Load Current Family ID

Parameters
appGroupNameSet the appGroupName of the ThingCustomConfig @discussion When the app is launched, call thie method to load the last recorded current family ID

◆ launchCurrentFamilyWithAppGroupName: [2/2]

- (void) launchCurrentFamilyWithAppGroupName: (NSString *_Nullable)  appGroupName

Load Current Family ID

Parameters
appGroupNameSet the appGroupName of the ThingCustomConfig @discussion When the app is launched, call thie method to load the last recorded current family ID

◆ leaveFamilyWithHomeId:memberId:success:failure: [1/2]

- (void) leaveFamilyWithHomeId: (long long)  homeId
memberId: (long long)  memberId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Members leaving the family

Parameters
homeIdFamily ID
memberIdID of the member to be removed
successSuccess callback
failureFailure callback

◆ leaveFamilyWithHomeId:memberId:success:failure: [2/2]

- (void) leaveFamilyWithHomeId: (long long)  homeId
memberId: (long long)  memberId
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Members leaving the family

Parameters
homeIdFamily ID
memberIdID of the member to be removed
successSuccess callback
failureFailure callback

◆ NS_UNAVAILABLE [1/4]

+ (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [2/4]

- (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [3/4]

+ (instancetype) NS_UNAVAILABLE

◆ NS_UNAVAILABLE [4/4]

- (instancetype) NS_UNAVAILABLE

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

- (void) rejectJoinFamilyWithHomeId: (long long)  homeId
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Declining an invitation to join a family

Parameters
homeIdID of the family invited to join
successSuccess callback
failureFailure callback

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

- (void) rejectJoinFamilyWithHomeId: (long long)  homeId
success: (ThingSuccessBOOL success
failure: (ThingFailureError failure 

Declining an invitation to join a family

Parameters
homeIdID of the family invited to join
successSuccess callback
failureFailure callback

◆ removeObserver: [1/2]

- (void) removeObserver: (id< ThingSmartFamilyBizDelegate >)  observer

Removing a Listener

Parameters
observerImplementation ThingSmartFamilyBizDelegate protocol

◆ removeObserver: [2/2]

- (void) removeObserver: (id< ThingSmartFamilyBizDelegate >)  observer

Removing a Listener

Parameters
observerImplementation ThingSmartFamilyBizDelegate protocol

◆ setCurrentFamilyId: [1/2]

- (void) setCurrentFamilyId: (long long)  homeId

Update the current family ID and cache to local

Parameters
homeIdCurrent Family ID

◆ setCurrentFamilyId: [2/2]

- (void) setCurrentFamilyId: (long long)  homeId

Update the current family ID and cache to local

Parameters
homeIdCurrent Family ID

◆ sharedInstance [1/2]

+ (instancetype) sharedInstance

◆ sharedInstance [2/2]

+ (instancetype) sharedInstance

◆ sortDeviceOrGroupWithHomeId:orderList:success:failure: [1/2]

- (void) sortDeviceOrGroupWithHomeId: (long long)  homeId
orderList: (NSArray< ThingSmartFamilyDeviceGroupOrderRequestModel * > *)  orderList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Under-family devices, group sorting

Parameters
homeIdFamily ID
orderListDevice, Group List
successSuccess callback
failureFailure callback

◆ sortDeviceOrGroupWithHomeId:orderList:success:failure: [2/2]

- (void) sortDeviceOrGroupWithHomeId: (long long)  homeId
orderList: (NSArray< ThingSmartFamilyDeviceGroupOrderRequestModel * > *)  orderList
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Under-family devices, group sorting

Parameters
homeIdFamily ID
orderListDevice, Group List
successSuccess callback
failureFailure callback

◆ updateFamilyWithHomeId:model:success:failure: [1/2]

- (void) updateFamilyWithHomeId: (long long)  homeId
model: (ThingSmartFamilyRequestModel *)  model
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Update family information

Parameters
homeIdFamily ID
modelFamily model
successSuccess callback
failureFailure callback

◆ updateFamilyWithHomeId:model:success:failure: [2/2]

- (void) updateFamilyWithHomeId: (long long)  homeId
model: (ThingSmartFamilyRequestModel *)  model
success: (ThingSuccessHandler success
failure: (ThingFailureError failure 

Update family information

Parameters
homeIdFamily ID
modelFamily model
successSuccess callback
failureFailure callback

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