All Products
Search
Document Center

Integration

Last Updated: Sep 18, 2019

Note: This topic describes integration of ApsaraVideo Player SDK V4.5.0 and later.

Supported systems

iOS 8.0 and later versions are supported.

Development environment

We recommend that you use Xcode as the development tool. This document is based on the Xcode development environment.

Integration method

Integration using local files

Download SDK

Download the latest version of ApsaraVideo Player SDK from [here].

SDK structure

ARM directory: is used to archive an application with bitcode enabled and without simulator architectures.
ARM_NO_BITCODE directory: is used to archive an application with bitcode disabled and without simulator architectures.
ARM_SIMULATOR directory: is used to archive an application with bitcode enabled and with simulator architectures.
To submit an application to Apple App Store, you need to strip the simulator architectures from dynamic frameworks. Otherwise, your application will be rejected.

The following figure shows SDK frameworks.

Note: AlivcConan, alivcffmpeg, and AliyunPlayer are required for SDK integration. You can find header files in AliyunPlayer directories.
AliyunMediaDownloader directories are used to download video or audio files for offline playback. They are optional for SDK integration.
.dSYM files are used to symbolicate crash reports.

Procedure

This topic takes V4.5.0 as an example to describe the integration procedure. The integration procedure for later versions is similar, except for the version number.

  1. Download the latest version of ApsaraVideo Player SDK and add it to a project in Xcode.
  2. In Xcode, choose General > Embedded Binaries. Then, click the add icon to add frameworks of the SDK.
  3. Click the Build Settings tab. Modify the framework search paths by adding directories of framework files.
  4. Start compiling code for your project.
    Note: If your code or referenced third-party code is not compatible with the symbol file of the alivcffmpeg or AlivcConan framework, remove alivcffmpeg or AlivcConan from Linked Frameworks and Libraries in Xcode. The two frameworks are not required for application links.

Integration using CocoaPods

You can use the following CocoaPods statements to integrate the SDK:

  1. platform:ios, '8.0'
  2. target 'yourProject' do
  3. pod 'AliPlayerSDK_iOS'
  4. end

Size of the integration package

After ApsaraVideo Player SDK is integrated, the IPA file size increases by about 3.6 MB if bitcode is enabled, or about 7.8 MB if bitcode is disabled.