This topic describes how to integrate the Push software development kit (SDK) for iOS.
Environment requirements
Item | Requirement |
OS version | iOS 8.0 or later |
Phone model | iPhone 7 or later |
CPU architecture | ARM64 or ARMv7 |
Integration tool | Xcode 8.0 or later |
bitcode | Disabled |
Download the Push SDK
Each version provides two SDKs: arm and arm&simulator. The arm SDK is for debugging on physical devices only. The arm&simulator SDK is for debugging on both physical devices and simulators. You must use the arm version for production releases.
Download the required version of the Push SDK for iOS from SDK download. The Basic Edition of the Push SDK is located in the AlivcLivePusher folder of the decompressed package, as shown in the following figure:
The following table describes the files shown in the figure.
File name | Description |
AlivcLivePusherSDK/arm | The arm-only version of the Push SDK Basic Edition. |
AlivcLivePusherSDK/arm&simulator | The arm and simulator version of the Push SDK Basic Edition. |
Integrate the Push SDK
After you integrate the Push SDK manually or using CocoaPods, you must also request permissions, disable Bitcode, and review the usage instructions.
This procedure provides instructions for both manual integration and CocoaPods integration. Follow the steps that apply to your chosen method.
Manual integration
Create an SDK test project named .
Drag the following files into your Xcode project:
AlivcLibReplayKitExt.framework
AlivcLivePusher.framework
To use retouching and sticker effects, you must also drag the following files:
queen.framework
openvc2.framework
MNN.framework
AliyunQueenUIKit.framework
If your project has a dependency on the ApsaraVideo Player SDK, you must also drag the following files:
RtsSDK.framework
AliyunPlayer.framework
artcSource.framework
alivcffmpeg.framework

Select Copy items if needed and click Finish.

After you import the SDK, add its dependencies under .

CocoaPods integration
In a Terminal window, run the following command to install CocoaPods.
ImportantEnsure that a Ruby environment is set up on your Mac before you install CocoaPods.
sudo gem install cocoapodsNavigate to your project's directory and run the following command in a Terminal window to create a Podfile.
pod initEdit the Podfile to add the Push SDK dependency. If you need live playback, you can also add the ApsaraVideo Player SDK dependency.
# Push SDK Basic Edition pod 'AlivcLivePusher', '~> x.y.z'Notex.y.zindicates the version number of Push SDK of Android. Replace it with the actual version number, such as 7.4.0. For information about the latest version number, see SDK download.You cannot integrate Push SDK and Player SDK (AliyunPlayer) at the same time. If you want to integrate both the SDKs, use ApsaraVideo MediaBox SDK instead. For more information, see Download all-in-one SDKs and Quick integration.
Run the following command in a Terminal window. After the command finishes, an .xcworkspace file is generated. Double-click this file to open your project in Xcode.
pod installor
pod update
Request permissions
NoteYou must request permissions for the camera and microphone.
In the Info.plist file, add the Privacy - Camera Usage Description and Privacy - Microphone Usage Description keys to request access to the camera and microphone.
If your app needs to continue stream ingest while in the background, enable background audio mode. To do this, select Audio, AirPlay, and Picture in Picture, as shown in the figure.
Disable Bitcode
The SDK does not support Bitcode. You must disable this option in your project. Set Enable Bitcode to NO, as shown in the figure.

Configure the license
For more information, see Integrate a license for the Push SDK.
Usage notes
For detailed API information, see API reference for the Basic Edition.
For sample API code, see Feature usage.
FAQ
Compilation Error
If you receive the Building for iOS, but the linked and embedded framework XXX.framework' was built for iOS + iOS Simulator compilation error, perform the following steps:
Click the Xcode menu.
Choose to open the settings dialog box.
Change Build System to Legacy Build System.
Missing Queen Dependency Libraries During Compilation
If dependency libraries for Queen are missing during manual integration, refer to the Queen_SDK_iOS documentation to add the required dependency libraries.