SDK 集成

更新时间:2024-04-26 10:10:09下载pdf

准备工作

您需要在 涂鸦开发者平台 上注册账号、创建 户外出行 相关产品等,例如 防丢器车载定位器智能电动车 等。然后获取到激活出行 SDK 的密钥。具体的操作流程请参考 快速集成 iOS App SDK

运行环境

出行 SDK 对开发环境和运行环境的要求如下:

  • Xcode 15.0 及以上版本
  • iOS 11.0 及以上版本

CocoaPods 安装

出行 SDK iOS 版示例目前存放在 GitHub 中,您可以下载示例进行查看。

  1. 参考 快速集成 iOS App SDK,在 podfile 文件中添加 ThingSmartHomeKit 依赖。

  2. 在 Podfile 中,添加出行 SDK 的依赖。

  3. 执行 pod installpod update

  4. 导入头文件 #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
    

Demo App