Rebuilding an already published React-Native application using expo.

Hello, I intend to recreate an old application (created via react-native init) already published on AppStore and PlayStore.
I would like to know if it is possible to create an Expo project from scratch, but set the package names and signatures to existing ones, so that I can update my app on AppStore and PlayStore normally?

I’ve not tried this myself, but I believe it’s possible.

First read this. I expect the following will also be useful:

https://docs.expo.io/versions/v36.0.0/distribution/building-standalone-apps/
https://docs.expo.io/versions/v36.0.0/distribution/app-signing/
https://docs.expo.io/versions/v36.0.0/distribution/app-stores/#versioning-your-app

If you have the source code, I’d run expo init in a separate directory and then compare/copy the newly generated Expo project files into the old project (or perhaps from the old project into the newly generated Expo project.) Either way you should end up with a working Expo project, which you should be able to run expo build:* in.

Also check the Configuration docs for stuff to put in app.json. Things that need to go in Info.plist should go into ios.infoPlist etc.

If you don’t have the original source code, you can still get the package/bundle name and versions etc. from the APK (and I assume the IPA).

For extracting info from an APK, see https://developer.android.com/studio/command-line/aapt2 and try something like this:

aapt2 dump badging something.apk

or:

aapt2 dump xmltree --file AndroidManifest.xml something.apk

I haven’t investigated tools for looking at IPA files, but like .apks and .aabs, I believe .ipas are ZIP files, so if you can’t find a tool to give you the info you need, try unzipping it (maybe rename it to .zip first) and poke around.

In terms of signing, I’ve not done that before, so I’m not entirely sure on the details, but if you have the original project files then I assume you’ll have the necessary keys and should be able to tell Expo to use them.

Otherwise you might need to ask Google and Apple to reset your keys. I’ve seen various posts on the forums about people getting Google to do that for them.

Good luck.

1 Like

Helped a lot man!
Thank you!

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.