Read the original article:Releasing a HarmonyOS App Quick App to AppGallery Connect
Context
HarmonyOS enforces a strict signature verification process to ensure app integrity and security. Before any HarmonyOS app or Quick App can be released on AppGallery Connect, it must be signed using a release certificate and release profile. These files validate the authenticity and trustworthiness of the app package (.app).
Description
The release process for a HarmonyOS app or Quick App involves several critical stages:
- Preparing signature files – creating a keystore (.p12) and CSR (.csr) to request certificates.
- Applying for a release certificate and profile – obtaining the digital certificate (.cer) and profile (.p7b) from AppGallery Connect.
- Configuring signature information – integrating these files into the project’s signing configuration within DevEco Studio.
- Building the release package – compiling the project as a signed release App Pack (.app).
- Releasing to AppGallery Connect – uploading the signed .app file for release to users.
Solution / Approach
-
Generate Key Store and CSR
- In DevEco Studio, navigate to: Build > Generate Key and CSR
- Create a new keystore (.p12) or use an existing one.
- Generate the CSR file containing your public key and organization details.
-
Request Release Certificate and Profile
- Use the CSR file in AppGallery Connect to request:
- Release Certificate (.cer)
- Release Profile (.p7b)
- Download these files once approved.
- Use the CSR file in AppGallery Connect to request:
-
Configure Signature in DevEco Studio
- Go to: File > Project Structure > Project > Signing Configs > default
- Deselect “Automatically generate signature.”
- Provide the following details:
- Store File: keystore (.p12)
- Store Password, Alias, Key Password
- Profile File: release profile (.p7b)
- Certpath File: release certificate (.cer)
- Set the signing algorithm to SHA256withECDSA.
-
Build the App for Release
- Select: Build > Build Hap(s)/APP(s) > Build APP(s)
- The release App Pack (.app) will be generated in: build > outputs > app > release
-
Release to AppGallery Connect
- Upload the signed .app file to AppGallery Connect for publication.
- Ensure any required public key fingerprints are updated if the app uses kits such as Account Kit, Map Kit, or Payment Kit.
Key Takeaways
- HarmonyOS requires all release apps to be digitally signed for authenticity.
- The signing process involves three main files:
- .p12 (keystore)
- .cer (certificate)
- .p7b (profile)
- Debug certificates cannot be used for app releases.
- The signing algorithm is SHA256withECDSA.
- The final deliverable for release is a digitally signed .app file.
Additional Resources
https://developer.huawei.com/consumer/en/doc/harmonyos-guides/ide-publish-app
Top comments (0)