The IPC SDK depends on the user management, device configuration, home management, device management parts of the Home SDK, and on this basis, the functions of the smart camera device are realized.
|TuyaSmartActivatorKit||Device network configuration|
|TuyaSmartCameraKit||Tuya smart camera business core kit|
TuyaSmartCameraKitis not a separate library, refer to SDK Architecture.
Add the following content in the
platform :ios, '9.0' target 'your_target_name' do pod "TuyaSmartActivatorKit" pod "TuyaSmartCameraKit" # pod "TuyaSmartCameraT" end
If your App need to support p2p 1.0, need to add
Then run the
pod update command in the root directory of project. For use of CocoaPods, please refer to the CocoaPods Guides. It is recommended to update the CocoaPods to the latest version.
Open project setting,
Target => General, edit
Bundle Identifierto the value from Tuya develop center.
Import security image to the project and rename as
t_s.bmp, then add it into
Project Setting => Target => Build Phases => Copy Bundle Resources.
Add the following to the project file
PrefixHeader.pch, Swift project add the following to the
#import <TuyaSmartBaseKit/TuyaSmartBaseKit.h> #import <TuyaSmartActivatorKit/TuyaSmartActivatorKit.h> #import <TuyaSmartCameraKit/TuyaSmartCameraKit.h>
AppDelegate.m，and use the
App Secretobtained from the development platform in the
[AppDelegate application:didFinishLaunchingWithOptions:]method to initialize SDK:
[[TuyaSmartSDK sharedInstance] startWithAppKey:<#your_app_key#> secretKey:<#your_secret_key#>];
TuyaSmartSDK.sharedInstance()?.start(withAppKey: <#your_app_key#>, secretKey: <#your_secret_key#>)
Now all the prepare work has been completed. You can use the sdk to develop your application now.
During the development we can open debug mode, print the log to analyze some problem.
#ifdef DEBUG [[TuyaSmartSDK sharedInstance] setDebugMode:YES]; #else #endif
#if DEBUG TuyaSmartSDK.sharedInstance()?.debugMode = true #else #endif