SDK Integration

Last Updated on : 2024-04-26 10:19:39download

Preparation

The Sweeper SDK serves your development as an extension of the Tuya Smart Life App SDK. Before you start development, register a developer account on the Tuya Developer Platform, create a product, and then get the key used to integrate with the SDK. For more information, see Preparation.

Fast integration

  1. Add the following code block to the Podfile:

    platform :ios, '9.0'
    
    target 'your_target_name' do
    	pod "ThingSmartSweeperKit"
    end
    
  2. In the root directory of your project, run pod update to integrate with a third-party library. For more information about CocoaPods, see CocoaPods Guides.

Import header files

  • Add the following content to the project file PrefixHeader.pch:

    #import <ThingSmartSweeperKit/ThingSmartSweeperKit.h>
    
  • Add the following content to the bridging header file xxx_Bridging-Header.h for a Swift project:

    #import <ThingSmartSweeperKit/ThingSmartSweeperKit.h>