跪拜 Guibai
← Back to the summary

HarmonyOS Certificate Cap: Reuse One Signing Certificate Across Unlimited Apps

Previously I published 3 apps. When publishing the 4th, applying for a certificate showed the message: quota reached.

Clicking to view the release certificate details, a glaring note appeared: each account can apply for at most 3 release certificates.

I was surprised. So each account can only publish at most 3 apps? Is there no law or justice? What do I do if I want to publish a 4th app? Should I open a new account, but what about real-name verification? Many questions made me worry my development path was blocked. After researching, I realized I was worrying unnecessarily. The official side already prepared a path for publishing multiple apps. This article explains the reasoning behind the certificate limit and the correct way to handle a 4th or even more apps.

First figure out: why is there a certificate limit

Developers who have published apps know that HarmonyOS developer center certificates fall into two categories: debug certificates, mainly used for debugging apps or atomic services, building debuggable packages; and release certificates, mainly used for formal release of apps or atomic services, packaging and publishing to Huawei AppGallery.

Each account can apply for at most 3 debug certificates and 3 release certificates. When the quota is reached, both DevEco Studio automatic signing and manual application will report an error like the following:

The number of certificates has reached the limit. Delete some certificates and try again. Certificate Number Exceeds Limit.

Many developers mistakenly think "one app must correspond to one certificate", but this is a misunderstanding of the signing system. HarmonyOS's signing system consists of three parts:

File Role Strongly bound to package name?
KeyStore file (.p12) Stores the private key No, reusable
Certificate (.cer) Proves developer identity No, reusable
Profile (.p7b) Declares app package name, permissions, devices and other signing info Yes, each app gets its own

The key point: certificates are reusable, different apps can use the same certificate; Profile is strongly bound to the app package name, so different apps will always have different Profiles. That is, the certificate limit does not limit the number of apps you can develop. In one sentence: one certificate can be associated with multiple Profiles, thus signing multiple apps.

Two solutions when there are more than three apps

When the certificate quota is reached, there are two officially recommended ways:

1. Delete the excess certificates of the corresponding type. Note: before deleting, ensure the certificate is not used by any app, otherwise the associated Profiles will also become invalid, affecting version updates for published apps.

2. Let multiple apps share the same certificate. This is the most recommended and sustainable approach, detailed below.

Full steps for multiple apps sharing one certificate

Take the release certificate as an example. Suppose the current certificate is already used by the app 《鸿元工坊》, with the following signing info:

App package name: com.abner.component

Signing library file: abner.p12

Certificate file name: abner.cer

Profile file name: component.p7b, associated certificate is abner.cer

The signing info configured in DevEco Studio for 《鸿元工坊》 is shown below.

When publishing the 4th app 《脑小练》, you only need to apply for a new Profile file. When applying for the new Profile, select the existing certificate as the "associated certificate".

The signing info for the new app 《脑小练》 is:

App package name: com.abner.brain

Signing library file: abner.p12 (reused)

Certificate file name: abner.cer (reused)

New Profile file name: nao.p7b, associated certificate is abner.cer

In summary: if you need to publish multiple apps, you can use the same certificate, only applying for a new Profile file for each app; other files can be reused. At the project configuration level, in the fourth app's build-profile.json5, signingConfigs just needs to point to the same .p12 and .cer, then replace with the new app's Profile file.

Several easy pitfalls

1. Chain effect of certificate deletion/revocation

If the certificate file used by the package has been deleted or revoked, the associated Profile will also become invalid, and uploading an update for a published app will fail (error code 1005: certificate file illegal). At that point you need to delete the invalid Profile, reapply for a certificate and Profile, and re-package and upload. So before revoking a certificate, make sure no published app or unpublished version depends on it.

2. Profile has its own separate limit

An app can apply for up to 100 Profile files. This limit is much larger than the certificate limit, so it rarely becomes a bottleneck, but pay attention when frequently applying for debug/release/specific-device release Profiles for the same app.

3. Certificate validity period

For real-name verified developers, the release certificate is valid for 3 years. Certificate expiration does not affect apps already on the market, but uploading a package signed with an expired certificate when updating a version will fail. It is recommended to replace certificates and Profiles promptly. In the case of shared certificates, one certificate replacement covers all associated apps, which is an extra benefit of reusing certificates.

4. Automatic signing scenario

When using DevEco Studio automatic signing, if the account's certificates are full, the same quota error will appear. At that point, either clean up unused certificates in the developer center, or switch to manual signing and reuse existing certificates.

Relevant summary

What we need to know is that the "only 3 certificates" rule is not a ceiling on the number of apps, but a reminder to establish proper signing asset management awareness:

  1. Certificates represent developer identity, reusable across apps.

  2. Profiles represent a single app's signing declaration, one-to-one with the package name.

  3. When there are more than 3 apps, prioritize reusing existing certificates + applying for new Profiles, rather than blindly adding new certificates.

  4. Only consider deleting a certificate when it is truly no longer used by any app.