Integrate Queen SDK for iOS to add retouching features — image retouching, face retouching, chroma key, stickers, makeup, gesture recognition, body shaping, hairdressing, and AR writing — to live streaming, video conferencing, and short video apps. Queen SDK is developed by the Alibaba video cloud team.
Prerequisites
Prepare a development environment that meets the following requirements.
|
Item |
Description |
|
iOS |
iOS 9.0 or later. |
|
macOS High Sierra |
macOS High Sierra 10.13 or later. |
|
Xcode |
Xcode 9.0 or later. Download from the Mac App Store. |
|
iOS device |
iPhone or iPad with ARMv7 or ARM64 architecture. macOS ARM64 devices are not supported. |
Integration methods
Integrate the SDK in pod or local mode.
Pod mode
Sample code:
pod 'Queen', '6.1.0-official-pro'
Local mode
-
Download and decompress the sample project package to obtain the following frameworks:
queen.framework opencv2.frameworkImportantopencv2.frameworkis not required for Basic Edition. -
Open Xcode and select your project target. On the General tab, add the preceding frameworks in the Frameworks, Libraries, and Embedded Content section and set the Embed parameter to Embed & Sign for these frameworks.
-
On the Build Settings tab of the project target, find ENABLE_BITCODE and set this parameter to NO.
-
Add
mnn.metallibfrom the obtainedqueen.frameworkfile to the project directory. This step is required only for Ultimate Edition and Full Edition.
Configure the license
Obtain a license of Queen SDK before you begin. Then configure the LicenseKey and LicenseFile in your project.
-
If you integrate both Queen SDK of ApsaraVideo Live and the short video SDK of ApsaraVideo VOD, they share the same LicenseKey and LicenseFile. Configure them once and use the latest license file.
-
If your SDK is updated or renewed, update the license file:
-
Request the latest license file. Obtain a license of Queen SDK.
-
Configure the license with the new file.
-
Import the license file to the app project and add the following keys to the Info.plist file:
-
AlivcLicenseKey: Your LicenseKey value. Example:MoCTfuQ391Z01****8f8745e23c8a457a8ff8d5faedc1****. -
AlivcLicenseFile: License file path relative to mainBundle. Example: AliVideoCert_164933454****.crt.
References
|
Item |
References |
|
Sample project |
|
|
Demo project on GitHub |
|
|
Third-party SDK integration |