Quick Integration
- Decompress all the downloaded software packages to obtain HWMUISDK for integration and HWMUISDKNativeDemo.
Figure 1 Decompressed files
AW_PortraitSDK.framework in HWMUISDK is used for background blurring. To integrate the background blurring function, contact Huawei sales personnel.
- Start the Xcode.
- Choose File > New > Project, choose App > Next, enter app information, and click Create to create a project.
- Add HWMUISDK.framework and OpenSourceIntegration.framework obtained in 1 to the project.
Choose TARGETS > General. Then, change the value in the Embed column of HWMUISDK.framework to Embed & Sign.
Figure 2 Effect after the adding - Configure project files.
- Enable the sandbox configuration items. If the app is not to be released to the app store, the sandbox can be disabled.
Set the values of the sandbox configuration item keys to true.
com.apple.security.app-sandbox
com.apple.security.device.audio-input
com.apple.security.device.camera
com.apple.security.files.user-selected.read-write
com.apple.security.files.downloads.read-write
com.apple.security.network.client
com.apple.security.network.serverFigure 3 Enabling sandbox configuration items
- In Build Settings, add the following two relative paths to Runpath Search Paths:
@executable_path/../Frameworks
@executable_path/../Frameworks/HWMUISDK.framework/Versions/A/Frameworks
Figure 4 Adding configuration items to Runpath Search Paths
- In Build Phases, modify Run Script to provide the library re-signature and make it consistent with the app signature.
cd "$BUILT_PRODUCTS_DIR"/
# Replace xxxx with your app name.
cd ./xxxx.app/Contents/Frameworks/
echo "####### HWMUISDK.framework xattr #######"
xattr -r -d com.apple.quarantine ./HWMUISDK.framework
xattr -r -d com.apple.quarantine ./OpenSourceIntegration.framework
echo "####### finish ###########"
echo "####### HWMUISDK.framework codeSgin #######"
codesign -f -s "$EXPANDED_CODE_SIGN_IDENTITY" --timestamp=none ./*.framework
codesign -f -s "$EXPANDED_CODE_SIGN_IDENTITY" --timestamp=none ./HWMUISDK.framework/Versions/A/Frameworks/*.framework
codesign -f -s "$EXPANDED_CODE_SIGN_IDENTITY" --timestamp=none ./HWMUISDK.framework/Versions/A/Frameworks/HWMNativeSDK.framework/Versions/A/Frameworks/WKTUP.framework/Versions/A/Frameworks/*.dylib
codesign -f -s "$EXPANDED_CODE_SIGN_IDENTITY" --timestamp=none ./HWMUISDK.framework/Versions/A/Frameworks/HWMNativeSDK.framework/Versions/A/Frameworks/WKTUP.framework
codesign -f -s "$EXPANDED_CODE_SIGN_IDENTITY" --timestamp=none ./HWMUISDK.framework/Versions/A/Frameworks/HWMNativeSDK.framework/Versions/A/Frameworks/WKTUP.framework/Versions/A/Frameworks/*.framework
- In the Info.plist file, configure the usage prompts (set the language as required) and the attributes related to exiting. The following keys need to be configured:
- Privacy - Camera Usage Description (Camera usage prompt)
- Privacy - Microphone Usage Description (Microphone usage prompt)
- Application can be killed immediately when user is shutting down or logging out: Set it to NO.
Figure 6 Info.plist configuration effect
- Enable the sandbox configuration items. If the app is not to be released to the app store, the sandbox can be disabled.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot