This topic describes how to integrate and configure the AliLiveSDK for iOS.

Integrate the SDK

Manual integration

  1. Download and decompress the AliLiveSDK for iOS.
    Note

    To obtain AliLive SDK and Demo, contact your business manager or submit a ticket.

  2. Create a project and import the framework. Then, select Embed & Sign for the imported framework in the Embed column.
    01
  3. Add the dependencies on third-party libraries to the Podfile.
    pod 'AFNetworking'
    pod 'SocketRocket'
    pod 'SVProgressHUD'
    pod 'Masonry'
  4. Install the dependencies on third-party libraries.
    pod install

Pod integration

  1. Add the dependencies on the player and third-party libraries to the Podfile.
    # Player
    pod 'AliLiveSDK_iOS', "4.0.2"
    pod 'AliPlayerSDK_iOS', "5.2.3"
    pod 'AliPlayerSDK_iOS_ARTC', "5.2.3"
    pod 'RtsSDK','1.5.0'
    # Third-party libraries
    pod 'AFNetworking'
    pod 'SocketRocket'
    pod 'SVProgressHUD'
    pod 'Masonry'
  2. Install the AliLiveSDK for iOS.
    pod install

Configure the project

  1. Configure Pod.

    Add the following code to the Podfile:

    pod 'RtsSDK','1.5.0'       
    pod 'AliPlayerSDK_iOS','5.2.3'       
    pod 'AliPlayerSDK_iOS_ARTC','5.2.3'
  2. Configure the project.
    1. Open the project that you created.
    2. Switch to the Build Setting tab and open the Build Options section.
    3. Set the Enable Bitcode parameter to No.
    4. Configure the info. Plist file.

      You can configure the info. Plist file in the following ways:

      • Add the following fields:
        Privacy - Camera Usage Description
        Privacy - Microphone Usage Description
        04
      • Add the following code to the source code of the info.Plist file:
         <key>NSMicrophoneUsageDescription</key>
         <string></string>
         <key>NSCameraUsageDescription</key>
         <string></string>
         <key>NSAppTransportSecurity</key>
         <dict>
             <key>NSAllowsArbitraryLoads</key>
             <true/>
         </dict>