BizBundle SDK

Last Updated on : 2024-08-22 08:33:39download

BizBundle SDK, built on top of the Home SDK, abstracts away the complexity of smart home services into independent modules. It lowers the learning curve to integrate with the Tuya ecosystem. There are currently five core capabilities available: device pairing, home management, group management, device management, and scene automation.

BizBundle SDK is constantly evolving and growing to meet the ever-changing market needs of your business.

Preparation

A developer account must be registered on the Tuya IoT Development Platform before your development with the BizBundle SDK.

Before you get started with a specific development solution, on the Tuya IoT Development Platform, you must register a developer account, create a product, define data points (DPs), and get the key used to integrate the SDK. For more information, see Preparation.

Step 1: Integrate Smart Life App SDK

The Smart Life App SDK must be integrated before the BizBundle SDK can be used. For more information, see Fast Integration with Smart Life App SDK.

Step 2: Integrate BizBundle SDK

Be sure you have integrated the Smart Life App SDK before integration with the BizBundle SDK.

  1. Use CocoaPods for fast integration

    1. Update CocoaPods to the latest version. For more information about CocoaPods, see CocoaPods Guides.

    2. Add the following code block to the Podfile:

      source 'https://github.com/tuya/tuya-pod-specs.git'
      platform :ios, '11.0'
      
      target 'Your_Project_Name' do
          pod "ThingSmartBusinessExtensionKit"
      end
      
  2. Import the header file.

    Add the following content to the PrefixHeader.pch file:

    #import <ThingSmartBusinessExtensionKit/ThingSmartBusinessExtensionKit.h>
    

    Add the following content to the bridging header file xxx_Bridging-Header.h for a Swift project:

    #import <ThingSmartBusinessExtensionKit/ThingSmartBusinessExtensionKit.h>
    
  3. Configure the SDK.

    After the app is launched, call loadConfig to configure the BizBundle SDK.

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
    {
        [ThingSmartBusinessExtensionConfig setupConfig];
        return YES;
    }