Tuya Commercial Lighting App SDK for iOS is dedicated to commercial lighting development solutions on iOS. It helps you quickly implement app functionality suitable for commercial lighting and scene linkage. With your app, users can manage projects, areas, and devices
The SDK includes the following functions:
- Users
- Log in and register
- User accounts registered with mobile phone numbers or email addresses
- Change passwords and sign out of accounts
- Update user information, such as nicknames
- Projects
- Create, update, modify, and query projects
- Get project details
- Create, edit, and delete outdoor projects
- Areas
- Add, query, modify, and delete areas
- Control area groups
- Get a list of areas of a project and a list of sub-areas of a specific area
- Dynamically configure area levels
- Get a list of devices that belong to a specific area
- Groups
- Create, query, edit, and delete groups
- Control groups
- Energy statistics
- Energy consumption dashboard
- Device maintenance
- Maintenance request
- Query maintenance reports
- Query device alerts
Add the following content in the file Podfile
:
platform :ios, '12.0'
target 'your_target_name' do
pod "ThingCommercialLightingKit"
end
Execute the command pod update
in the project's root directory to begin integration.
For more information about CocoaPods, see CocoaPods Guides.
- Open the project to apply the setting,
Target => General
, and setBundle Identifier
to the value from the Tuya developer center. - Import header file:
#import <ThingCommercialLightingKit/ThingCommercialLightingKit.h>
- Open the file
AppDelegate.m
,and use theApp ID
andApp Secret
that are obtained from the development platform in the[AppDelegate application:didFinishLaunchingWithOptions:]
method to initialize the SDK:
[ThingSmartSDK.sharedInstance startWithAppKey:TY_APP_KEY secretKey:TY_SECRET_KEY];
All the preparation steps are finished. You can use the SDK to develop your application.
For more information, see:
You can get support from Tuya Smart by using the following methods:
Tuya Smart Help Center: https://support.tuya.com/en/help
Technical Support Console: https://service.console.tuya.com