Download and integrate an SDK

更新时间:
复制 MD 格式

The platform provides software development kit (SDK) packages to simplify your app development. When you download an SDK package, you can also download other required files, such as security images.

Download the SDK

  1. Go to the SDK and plug-in page of your OEM app and select the APP SDK tab.
  2. Select a version number for the SDK configuration item. We recommend that you select the latest version.

    The API Level of an SDK package indicates its feature version. API Levels are used to manage compatibility between different SDK versions. Each API Level corresponds to a specific set of features and SDK packages. For more information, see API Level versions.

    Note If you have integrated an SDK of API Level 7 or earlier, upgrade it to the latest version. For more information, see Upgrade the SDK to API Level 8 (Android) and Upgrade the SDK to API Level 8 (iOS).
  3. Select an SDK package.
    The SDK includes the following packages:
    • Basic package (Required)
    • User account (Required)
    • Message push

      The message push feature requires additional parameter configuration. For more information, see Mobile push development guide.

    • Device control
    • Network provisioning
    • Bluetooth device connection framework
  4. Click Download iOS SDK or Download Android SDK.
    The downloaded file is a compressed package. After you decompress it, the package contains the following files:
    • iOS

      A Podfile file and security images

    • Android

      A dependency.gradle file and security images

      Note To download Android security images, you must first upload an APK signature file. If you do not upload a signature file, the security images are not included in the compressed package. For more information, see Integrate security images.

Integrate the Android SDK

Before you integrate the SDK, make sure that you have integrated the security images. For more information, see Integrate security images. The recommended development tool for Android apps is Android Studio. We recommend that you use the latest stable version.

添加依赖文件
  1. Place the downloaded dependency.gradle file in the root directory of the module.
  2. In the build.gradle file in the root directory of the module, add the following code.
    apply from:'dependency.gradle'

Integrate the iOS SDK

Before you integrate the SDK, make sure that you have integrated the security images. This SDK uses CocoaPods to manage project dependencies.

  1. Place the downloaded Podfile in the root directory of the project folder.
  2. Change the target name in the Podfile to match your Xcode project's target name.
    修改target
  3. Open the terminal. In the same directory as the Podfile, run the pod update command.

What to do next

After you download and integrate the SDK, you must initialize it. For more information, see Initialize the Android SDK and Initialize the iOS SDK.