How to submit your react native app to Huawei AppGallery
Huawei captures a good market percentage so it’s good to have your app there. This tutorial will cover everything there is to submit your app to AppGallery successfully
Build a release APK or ABB
Before we start deploying you need to build the APK or ABB of your app. Now, I’m not going to go over the process of how to create an APK or ABB from your react native project, All you need to make sure is that when you successfully build the APK using this command ./gradlew assembleRelease
there is a .apk
in the android/app/build/outputs/apk
folder OR you have successfully built the ABB using this command ./gradlew bundleRelease
and there is a .abb
file in your android/app/build/outputs/bundle/release
.
Submitting the app
Open https://developer.huawei.com/consumer/en/appgallery/ and click on Upload your app. It’ll take you to the login page. Register a new account if you don’t have one it’s free. If it’s your new account verify your identity.
You’ll see this dashboard below, which indicates that you have successfully created a Developer account for AppGallery Connect.
Click on the New app button and fill in the required information about the app. It’ll take you to a similar dashboard like when you submit iOS/Android Apps.
On the App Information page, you can upload screenshots, icons of the app, and all the other public information. Fill in all of that, save it.
Next from the side menu select App Signing
Select the first (Recommended) option.
Now, I assume that you have your YOUR_RELEASE_KEY_FILE_NAME.keystore
file. If you don’t make a .keystore
file.
Check if the .keystore
file is of type JKS. To check this do cd android/app
ad run this command:
keytool -list -rfc -keystore YOUR_RELEASE_KEY_FILE_NAME.keystore |grep "Keystore type"
It’ll ask you for the password of your .keystore
file and you’ll see Keystore type JKS as seen below.
If your key type is not JKS and it’s a PKCS12 type, to convert to a new JKS Keystore type this is the command (Not Tested — Source):
keytool -importkeystore -srckeystore somekeystore.pkcs12 -destkeystore somenewkeystore.jks -deststoretype jks
Now to generate a .pem
file from .keystore
type:
keytool -export -rfc -keystore release-build.keystore -alias release -file upload_certificate.pem
If you get this warning just ignore it:
Warning:
The JKS keystore uses a proprietary format. It is recommended to migrate to PKCS12 which is an industry standard format…
and find the upload_certiicate.pem
file in the android/app
folder. Upload it and click on Submit.
Now click on the Draft from the side menu. This is where you can do things like adding privacy policy URLs and other information. I’m going to focus on the App version section as shown in the image below (Ignore the red warning):
Click on Manage app packages and then click on Upload from the popup that’ll appear. Select the .apk
or .abb
file whichever you prefer (I’m going with .abb
) that you have made and it’ll start uploading shortly.
After it’s successfully submitted you’ll see a warning (just press OK) and put the rest of the information asked on the Version Information Draft page.
When all is done, ensure that by seeing the Green checkmark on the Configure ad select version tabs, and then click on the Submit button.
CONGRATS 🎉🎉🎉 You have just submitted your app to the Huawei AppGallery.
Side Notes:
- If you select the Chinese Mainland as a country from the list of countries where your app will be available you need to upload the Copyright Certificate which contains a unique identification number, the name of the app, and the company that owns the certificate. The name of the app must match the name on the certificate. If the app name changes, a new certificate must be applied. This isn’t a trademark, but it proves the ownership of the app to the Chinese app stores. — Source
- It’s better if you have the
.abb
file and not.apk
as you might run into an error that states “app name should be between 3 and 64 characters” or “app name should be between 1 and 64 characters”. - Functionalities that require GMS (Google Mobile Services) will not work and you need to set up and alternate that is HMS (Huawei Mobile Services).
- Personally, I know that Google SignIn implemented with firebase or using Google Cloud OAuth will not work. Whereas Firestore will work, I haven’t tested the other services of firebase yet.
As always if you find this helpful share and press the 👏🏻 button so that others can find it too. If you see a typo feel free to highlight it or if you’re stuck drop a comment and I’ll try my best to help you.
All my tutorials are free but if you feel like supporting you can buymeacoffee.com/chaudhrytalha
Happy Coding 👨🏻‍💻