A security image is an encrypted file that provides basic security for an application. When you develop an application, you must download the corresponding security image and integrate it into your project.
Prerequisites
You have created a self-branded app. For more information, see Create a self-branded app.Overview
When you develop an application using the latest App SDK from the platform, you must integrate the matching security image.
Integrate an iOS security image
- Go to the self-branded app page.
- If you are upgrading an existing project to a new SDK version, first click Update security image. Then, click Download security image for iOS to obtain the image that is compatible with the new SDK version.
Note If you are developing an app from scratch in a newly created project, download the latest version of the App SDK from the platform page. Click Download Security Image to obtain the latest security image that corresponds to the SDK.
- Place the security image in the root directory of the application project.
- Open Xcode and drag the security image to the root directory of the xcodeproj.
- Set the Bundle Identifier for the iOS project.
For security purposes, the project's Bundle Identifier must match the bundleID (package name) that you specified when you created the self-branded app.
Integrate an Android security image
- Go to the self-branded app page.
- Upload the signed APK file.
All Android applications must be signed. You can find instructions online for generating a signature file.
- Click Upload apk to get security image for Android.
- Place the security image in the \src\res\drawable directory of your Android project.
- Verify the signature.
The Android security image must be used with its corresponding signature.
Note If your product is sold in markets outside China and your Android application will be listed on Google Play, do not use the Google Play App Signing service. The security image must be paired with your original signature. Using the Google Play App Signing service will prevent your application from starting.Confirm that the build.gradle file contains the following code. Ensure that this signature configuration matches the one in the APK file that you uploaded in Step 3.
android{ signingConfigs { release { v2SigningEnabled true storeFile file("debug.jks") storePassword '123456' keyAlias 'ray_ni' keyPassword '123456' } }
If you are developing an application with an older App SDK (API Level 8 or earlier), see the Archived Documents.