Queen SDK is a retouching effect feature provided by the Alibaba Cloud video team. It supports various personalized customization services, such as image retouching, face retouching, chroma key, stickers, makeup, gesture detection, body shaping, hairdressing, and AR writing. It applies to scenarios such as ApsaraVideo Live, video conferencing, and short video production. This topic describes how to integrate Queen SDK for iOS to implement retouching features.
Prerequisites
The following table lists development environment requirements.
Category | Description |
System version | Supports iOS 9.0 and later. |
macOS High Sierra version | Supports macOS High Sierra 10.13 and later. |
Xcode version | Supports Xcode 9.0 and later. Download Xcode. |
iOS device | Mobile devices with armv7 or arm64 architecture, such as iPad or iPhone. Macs that support arm64 architecture are not included. |
Integration methods
The SDK supports both pod and local integration. Choose the integration method that best suits your needs.
Pod integration
To integrate using pod, follow these steps:
pod 'Queen', '6.1.0-official-pro' Local integration
You can download and decompress the sample project to obtain the following frameworks.
queen.framework opencv2.frameworkImportantThe lite version does not require
opencv2.framework.You can open Xcode. In the project's target, on the General tab, add the frameworks in the Frameworks, Libraries, and Embedded Content section. Set the Embed property of the added frameworks to Embed & Sign.
In the project's target, on the Build Settings tab, search for ENABLE_BITCODE. You can then set it to NO.
You can add
mnn.metallibfromqueen.frameworkto the project directory. This step is required only for the full and ultimate versions.
Configure the license
You must obtain a license in advance. For more information, see Obtain a Queen SDK License. After you obtain the license, configure the LicenseKey and LicenseFile (certificate file) in the project as follows.
If you integrate Queen SDK for ApsaraVideo Live and the short video SDK for ApsaraVideo VOD simultaneously, their LicenseKey and LicenseFile (certificate file) are the same. Configure them only once. Use the latest certificate file.
If your purchased SDK version changes or requires renewal (SDK expiration), update the certificate file. Update as follows:
Obtain a new license. For instructions, see Obtain a Queen SDK License. To obtain the latest certificate file, send an email.
After you obtain the latest certificate, update it by following the license configuration steps in this topic.
You can import the certificate file into the app project. Then, add two Keys to the Info.plist file.
The first
KeyisAlivcLicenseKey. Itsvalueis the LicenseKey, for example:MoCTfuQ391Z01****8f8745e23c8a457a8ff8d5faedc1****.The second
KeyisAlivcLicenseFile. Itsvalueis the path of the certificate file (relative to mainBundle), for example: AliVideoCert_164933454****.crt.
References
Item | Link |
Sample project | |
Demo project on GitHub | |
Common SDK vendor integration examples for developers. |