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.
|iOS version||iOS 8.0 and later are supported.|
|Development tool||We recommend that you use Xcode. The operations in this topic are based on Xcode. You can click here to download Xcode.|
|SDK version||ApsaraVideo Player SDK V5.3.0 and later are supported.|
PreparationsDownload the SDK
Download the latest version of ApsaraVideo Player SDK for iOS. For more information, see Release notes of ApsaraVideo Player SDK for iOS.
cd $(SDK_PATH) // The SDK_PATH variable specifies the path of the SDK package. sh createMoreKindsOfArch.sh
- ARM folder: The bitcode is enabled and simulator architectures are not included in the folder.
- ARM_NO_BITCODE folder: The bitcode is disabled and simulator architectures are not included in the folder.
- ARM_SIMULATOR_NO_BITCODE: The bitcode is disabled and the i386 x86_64 armv7 arm64 architecture is included.
- ARM_SIMULATOR folder: The bitcode is enabled and simulator architectures are included in the folder.
- AliyunMediaDownloader: optional. This framework is used to download files for offline playback.
- artcSource.framework: optional. This framework is used to support the Alibaba Real-Time Communication (ARTC) protocol.
- artpSource.framework: optional. This framework is used to support the Alibaba Real-Time Transport Protocol (ARTP) protocol.
- RtsSDK.framework: optional. This framework is used to provide the Real-Time Streaming (RTS) feature.
- AlivcConan: The dependency on this framework has been removed in ApsaraVideo Player SDK V5.3.0.
When you package your application files, dSYM files are used to symbolicate crash reports.
AliyunPlayer and alivcffmpeg are required for SDK integration. You can find header files in the directory of the AliyunPlayer framework.
You can integrate the SDK by using on-premises files or CocoaPods.
- Using on-premises files
- Click the General tab.
- Add the frameworks of ApsaraVideo Player SDK for iOS to the Frameworks, Libraries, and Embedded Content section. Select Embed & Sign in the Embed column for these frameworks.
- Click the Build Settings tab.
- In the Search Paths section, set the Framework Search Paths parameter to the on-premises path of the frameworks.
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. The dependency on AlivcConan has been removed in ApsaraVideo Player SDK V5.3.0.
- Using CocoaPodsThe following example shows how to integrate ApsaraVideo Player SDK for iOS by using CocoaPods statements:
ruby platform:ios, '8.0' target 'yourProject' do pod 'AliPlayerSDK_iOS' endThe following code provides an example on how to integrate ApsaraVideo Player SDK for iOS to support ARTC, ARTP, and RTS:
ruby platform:ios, '8.0' target 'yourProject' do pod 'AliPlayerSDK_iOS', '5.3.0' pod 'AliPlayerSDK_iOS_ARTP', '5.3.0' pod 'AliPlayerSDK_iOS_ARTC', '5.3.0' pod 'RtsSDK', '1.5.0' endNote If you want to integrate ApsaraVideo Player SDK for iOS and the short video SDK for iOS at the same time, replace AliPlayerSDK_iOS with AliPlayerPartSDK_iOS. This is because AliPlayerPartSDK_iOS contains no FFmpeg frameworks, which avoids conflicts with the FFmpeg framework of the short video SDK for iOS.