This topic describes the supported systems, development environments, and integration methods of ApsaraVideo Player SDK for iOS. This topic also describes how to integrate the SDK.
We recommend that you use Xcode as the development tool. This topic is based on the Xcode development environment.
Integrate the SDK by using on-premises files
- Download the SDK
Download the latest version of ApsaraVideo Player SDK for iOS. For more information, see Release notes of ApsaraVideo Player SDK for iOS.
- SDK structure
- ARM folder: The bitcode is enabled, but simulator architectures are not included in the folder.
- ARM_NO_BITCODE folder: The bitcode is not enabled and simulator architectures are not included in the folder.
- ARM_SIMULATOR folder: The bitcode is enabled and simulator architectures are included
in the folder.
Notice To submit an application to Apple App Store, you must strip the simulator architectures from dynamic frameworks. Otherwise, your application fails to be submitted.
- The following figure shows frameworks.Notice AlivcConan, alivcffmpeg, and AliyunPlayer are required for SDK integration. You can find header files in AliyunPlayer directories. AliyunMediaDownloader directories are optional, which are used to download files for offline playback. dSYM files are used to symbolicate crash reports.
- Integration procedure
In this example, ApsaraVideo Player SDK V4.5.0 for iOS is integrated. The integration procedure for later versions is similar, except for the version number.
- Download the latest version of ApsaraVideo Player SDK for iOS and add it to a project in Xcode.
- On the General tab, add frameworks of ApsaraVideo Player SDK for iOS to the Embedded Binaries section.
- Modify the framework search paths on the Build Settings tab by adding directories
of framework files.
Note If your code or the third-party code that you reference conflicts with the symbol file of the alivcffmpeg or AlivcConan framework, remove alivcffmpeg or AlivcConan from Linked Frameworks and Libraries. The two frameworks are not required for application links.
Integrate the SDK by using CocoaPods
platform:ios, '8.0' target 'yourProject' do pod 'AliPlayerSDK_iOS' end