SDK Integration

Last Updated on : 2024-04-26 10:10:09download

Preparation

An account is registered on the Tuya Developer Platform, and a smart travel product such as an anti-lost tracker, a vehicle locator, or a smart electric vehicle is created. A key is obtained to activate the Travel SDK. For more information, see Fast Integration with Smart Life App SDK for iOS.

Prerequisites

The following environments are required to develop and run the Travel SDK:

  • Xcode 15.0 or later
  • iOS 11.0 or later

Install CocoaPods

You can download the Travel SDK sample for iOS on GitHub.

  1. Follow the instructions in Fast Integration with Smart Life App SDK for iOS and add the ThingSmartHomeKit dependency to podfile.

  2. In the Podfile, add the dependencies of the Travel SDK.

  3. Run pod install or pod update.

  4. Import the header file #import <ThingSmartOutdoorKit/ThingSmartOutdoorKit.h>.

    source 'https://cdn.cocoapods.org/'
    source 'https://github.com/tuya/TuyaPublicSpecs.git'
    source 'https://github.com/tuya/tuya-pod-specs.git'
    
    platform :ios, '11.0'
    inhibit_all_warnings!
    
    target 'MyApp' do
    
    	pod 'ThingSmartHomeKit'
    
    	pod 'ThingSmartLangsPackKit'
    	#outdoor
        pod 'ThingSmartOutdoorKit', '~> 5.2.0'
    
    end
    

Run the demo app

You can get the following samples on GitHub: