can't upload updated react native app into play store - react-native

Yesterday I've finished and uploaded into play store a react native app (I've followed these steps).
Today I've made some changes to the app and I tried to upload into the play store the new version (I changed versionCode and versionName inside build.gradle file).
When I try to upload the new .apk file in the play store I get this error message:
You uploaded an APK that is signed with a different certificate to your previous APKs. You must use the same certificate. Your existing APKs are signed with the certificate(s) with fingerprint(s)

Related

React native - You uploaded an APK that is not signed with the upload certificate

I have uploaded an Expo project few months ago, I'm not sure I signed the app but running expo fetch:android:keystore gives me the following info:
Keystore password
Key alias
Key password
I started a new project using React Native CLI so I generated a new keystore file using the data above, but Google Play shows me that error message after I tried to upload the release APK
You uploaded an APK that is not signed with the upload certificate. You must use the same certificate. The upload certificate has fingerprint:
SHA1: XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX
and the certificate used to sign the APK you uploaded has fingerprint:
SHA1: YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY:YY
What am I doing wrong? to be honest I'm not familiar with app signing on Google Play.
How can I upload a new APK from a new RN CLI project without changing the package name and deploying a new app? I don't wanna lose my current clients.
So to anyone who will ever encounter this problem, what I did was copy the file app_name.jks from the expo project folder to android/app (RN CLI) and executed the command expo fetch:android:keystore (Expo project) to get the Keystore, Alias and Password of the Expo project.
Then changed the android/app/build.gradle (RN CLI)
signingConfigs {
release {
storeFile file('app_name.jks')
storePassword System.console().readLine("\nKeystore password: ")
keyAlias 'here is the alias from the command above`'
keyPassword System.console().readLine("\nKey password: ")
}
}
Then executed the build command ./gradlew assembleRelease --no-daemon, console log will ask for the password and the keystore password (from the expo command above) and that's it!
I was able to upload to Google Play using the same upload fingerprints

how to use exist certificate to sign an apk with expo?

generate apk with the command
# expo build:android
and upload to google play console.
But it fails and says; You uploaded an APK that is not signed with the upload certificate
then what I did go to App Signing section and downloaded deloyment.cert file,
now I wonder how I can tell expo to use this file to sign and build apk file?
expo cli version 3.22.3
The hashes in keystore of # expo credentials:manager output diffirent from what it looks in store, how can I generate new keystore file to update this info?
you can run expo credentials:manager in your project directory to manage the signing credentials for your project. read more about app signing on android with expo managed projects at https://docs.expo.io/distribution/app-signing/#android

React native code update

I published my first app to AppStore last night.
I just want to know if there is code change in my app,
Should I have to re-build and upload .ipa file to itunes connect again?
(Currently, I do not use CodePush and I build app with exp)
Thanks.
Expo comes with a built in CodePush equivalent.
Whenever you publish to expo (using exp publish, the XDE etc), expo builds new JS bundles and uploads them to their servers.
Users who downloaded the app from the stores will get those updates - while iOS users will get them as soon as they open the app, Android users will get them in the second time (iOS is does this syncly while Android asyncly).
Note that this does not apply to changes in the app config (app.json), including sdk upgrades or any other configuration changes.
Yes, you will need to rebuild the release version of your app and upload to the App Store as a new version.

Google play services - Failed to sign in. Please check your network connection

After generated signed APK file and use this file to directly install to real device, it works well. But when use exactly this file to upload to Play Store I got that error.
(My App's already published)
If you use gradle to compile your APK, check if your version is newer than the previous published one on Play Store.
in build.gradle
{
versionCode 4
versionName "1.0.1"
}

Update old apk with new

I currently have an app in the play store/app store but recently I started getting problems on my debug version so I decided to create a new react-native project and copy/paste all my code.
Can I build this APK/IPA from this new project and upload it to the store without problems? Will Android/Apple decline my request?
For Android as long as you use the same application id and the same keystore to sign the APK with you can recreate the app and submit it for review to add to store.
For Apple the important part is the bundle id. You need to set the bundle id as same and set the version number to correct one.