Upgrade Guide

Last Updated on : 2024-06-24 08:09:43download

Tuya upgrades Smart Life App SDK and makes the latest version generally available. Based on the optimized business architecture, you can benefit from the neutral software development service and take your unique and proprietary application business to the next level. This topic describes how to upgrade your SDK from a legacy version to v5.x.x.

Applicability

The following legacy versions can be upgraded to v5.x.x:

  • Smart Life App SDK v3.x.x and v4.x.x
  • UI BizBundle SDK v3.x.x and v4.x.x

Upgrade Smart Life App SDK

  1. Make sure the network on which the SDK-based app runs is available. Download ThingSmartCryption from the Tuya Developer Platform.

  2. Make the following changes to the Podfile:

    • Security images previously used in legacy versions are deprecated. You can delete t_s.bmp from the project.
    • Verify the SDK version and change the word Tuya in the names of dependencies to Thing. Example:
      • Before:
        pod 'TuyaSmartHomeKit', 'xx'
        
      • After:
        pod 'ThingSmartHomeKit', '~> 5.0.0'
        
    • If you use the secondary library that TuyaSmartHomeKit depends on, you can find the respective version number from podspec in the GitHub project.
  3. Go to Tuya Developer Platform > App SDK > SDK Development > Details page of your SDK-based app > Get SDK, and get the latest key information, including AppKey and AppSecret.

    Upgrade Guide
  4. Replace the key information in your project with the new one. For more information, see Configure the SDK.

  5. Make sure the APIs in the SDK can be compiled as expected. To minimize the manual work, we recommend that you use the upgrade script in the GitHub project to change the word Tuya in the identifiers of all APIs to Thing.

Upgrade UI BizBundle SDK

  1. Finish the steps in Upgrade Smart Life App SDK.
  2. In the Podfile, change the word Tuya in the names of BizBundle libraries to Thing and specify '~> 5.0.0' as the version number.
  3. Make sure the file ty_custom_config.json is available and rename it to thing_custom_config.json in your project. For more information about this file, see Integrate with Framework.