[Huawei Developers] Mayism:
Common Problems

As a developer, you may have encountered situations when your app is rejected due to app signature problems, for example:

1. Your app signature is different from that of the app version already available for sale.

2. Your app signature is inconsistent with that configured in AppGallery Connect, that it does not support third-party sign-in or payment.

3. When using HMS Core services, your app fails to send push messages or cannot load a map due to inconsistent certificate fingerprints.

4. After release, your app cannot be updated on different platforms due to inconsistent app signatures.

There could be more.

You may wonder why your app is always rejected during app review, while the app signature is consistent and no problems occur during your local testing. In these cases, your app may be re-signed by the App Signing service of HUAWEI AppGallery Connect.

What Is an App Signature?

Before dealing with the problems, let's see what an app signature is.

Remember two points:

1. App signatures are important. Your app cannot be released without one.

2. App signatures cannot be changed. Otherwise, your app will be in a mess - its certificate fingerprint changes, its authentication information changes, app update fails, and many other problems occur.

We usually use Android Studio or run commands to sign an app.

What Is AppGallery Connect App Signing?

What AppGallery Connect App Signing has to do with it? Well, it provides another way for you to sign your app.

Now there are two options for you:

The first one is that AppGallery Connect generates a new signature for your app. The new signature is unique, and you need to keep using it since then.

Select Let AppGallery Connect to create and manage my app signature key in AppGallery Connect to use this method.

However, you can only use this method for new app release. As I said, AppGallery Connect generates a new signature. This method does not work if you already have a released app version, which already has an app signature.

So, the second way is to upload a signature file. In this case, AppGallery Connect only signs your app using the file you uploaded. No matter what signature file you upload, AppGallery Connect will keep it safe and sound. Select Export and upload the key and certificate in AppGallery Connect to use this method.

Use a tool or commands to generate a ZIP signature file, upload the file to AppGallery Connect, and let AppGallery Connect sign your app. Make sure you upload the same signature file as that of your released app version. Otherwise, the signatures will be inconsistent.

But don't worry, AppGallery Connect now supports verification of app signature files. If you upload an inconsistent signature file, AppGallery Connect will display a message, indicating that the file cannot be uploaded.

Here's an example. You have signed an app using Android Studio. Assume that its app signature is A. Then you use App Signing to generate a new signature B. The final signature of this app will be B, which is different from A.

However, if you upload a ZIP file that is generated using signature A, the signature will remain unchanged during app review and release. In a word, you decide your app signature.

How Do We Decide Which Way to Use?

We don't want to face problems. So how can we choose the right way? It's simple.

If you wish to release an app only on HUAWEI AppGallery, you can let AppGallery Connect generate an app signature for you. If you wish to release the app on multiple platforms and keep the signature file consistent, or if you need to use the existing signature for authentication, just upload a file.

If you have released an app on AppGallery, you can only upload a file containing the same signature as that of the released version.

Now, we can see that the problems mentioned before are caused by an incorrect app signature. Perhaps you chose the wrong way to sign your app, or uploaded a wrong signature file. Unfortunately, an app signature cannot be deleted once it has been applied. The current solution is to delete the app, create it again, and then choose the right way.

PS:

1. App signature is not equivalent to App Signing. A signature is mandatory, while you can choose whether to use the App Signing service.

2. App Signing is optional for an APK package, but mandatory for an AAB package.

3. If an app signature changes, the corresponding certificate fingerprint also changes. In this case, you need to configure a new certificate fingerprint for related services.

For more details, check:

AppGallery Connect App Signing documentation:

https://developer.huawei.com/consumer/en/doc/development/AppGallery-connect-Guides/agc-app_bundle