@fabiofreitas (Fabiofreitas) posted a new topic, subject "Rebuilding an already published React-Native application using expo.". It read:

   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?

After which, @wodin (Michael Wood) added

    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 AAPT2 | Android Developers and try something like this:
    [code] 
        aapt2 dump badging something.apk
        
    [/code]
    
    or:
    [code] 
        aapt2 dump xmltree --file AndroidManifest.xml something.apk
        
    [/code]
    
    I haven't investigated tools for looking at IPA files, but like `.apk`s and `.aab`s, I believe `.ipa`s 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.

Then @fabiofreitas (Fabiofreitas) said

    Helped a lot man!  
    Thank you!

Then @system (system) said

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


{'source': 'discourse', 'url': 'https://forums.expo.dev/t/rebuilding-an-already-published-react-native-application-using-expo/31595', 'title': 'Rebuilding an already published React-Native application using expo.', 'views': 3082, 'has_accepted_answer': True, 'word_count': 440, 'like_count': 2, 'reply_count': 1, 'participant_count': 2, 'posts': 4, 'tags': '', 'author': '@fabiofreitas (Fabiofreitas)', 'participants': '@fabiofreitas (Fabiofreitas), @wodin (Michael Wood), @system (system)', 'image_url': [None], 'created_at': '2019-12-27T19:35:37.530Z', 'last_posted_at': '2020-01-18T21:41:55.439Z'}