DEV Community

Ajmal Hasan
Ajmal Hasan

Posted on • Edited on

1

Migrating an Old React Native App to a New Version – The Clean Way!

Migrating your codebase to a new React Native project while still publishing updates to the same app on both the Play Store (Android) and App Store (iOS) can be a tricky process. It's crucial that your new project matches the identity of the old app to ensure that the stores recognize your new builds as updates and not as entirely new apps. Here’s a breakdown of what needs to be updated to keep your app's identity intact across both platforms.


1. Bundle Identifier (iOS) & Application ID (Android)

  • iOS: Ensure the bundleIdentifier in ios/YourApp/Info.plist and Xcode project settings match the old app’s bundle ID. For example:
  <key>CFBundleIdentifier</key>
  <string>com.yourcompany.yourapp</string>
Enter fullscreen mode Exit fullscreen mode
  • Android: Similarly, update the applicationId in android/app/build.gradle to match the old app’s application ID.
  defaultConfig {
      applicationId "com.yourcompany.yourapp"
  }
Enter fullscreen mode Exit fullscreen mode

Additionally, make sure the package name in android/app/src/main/AndroidManifest.xml matches.


2. Versioning

  • iOS: Update CFBundleShortVersionString (version) and CFBundleVersion (build number) in Info.plist. Ensure these are greater than the version you previously uploaded to the App Store.
  <key>CFBundleShortVersionString</key>
  <string>2.0.0</string>
  <key>CFBundleVersion</key>
  <string>100</string>
Enter fullscreen mode Exit fullscreen mode
  • Android: Similarly, update versionCode (must increment) and versionName (string) in android/app/build.gradle to reflect a higher version than the previous one.
  versionCode 101
  versionName "2.0.0"
Enter fullscreen mode Exit fullscreen mode

3. App Name and Display Name

  • iOS:

    Update the CFBundleDisplayName in Info.plist to ensure the app name is the same on the App Store.

  • Android:

    Update android:label in android/app/src/main/AndroidManifest.xml to reflect your app's name as it appears on the Play Store.


4. App Icons and Launch Screens

Replace the default app icons and splash screens with your app’s branding assets for both platforms. Ensure the icons meet the required specifications for the App Store and Play Store.


5. Signing Keys

  • iOS:

    Use the same Apple Developer account, provisioning profiles, and certificates that were used for the previous app version.

  • Android:

    Ensure you are using the same keystore file for signing your APK. The keystore file (android/app/my-release-key.keystore) should be identical to the one used previously. Make sure android/gradle.properties and android/app/build.gradle reflect the correct signing config.


6. Permissions and Capabilities

Ensure that all permissions in AndroidManifest.xml and capabilities in Xcode match the previous app version, as these could affect the app’s functionality or approval process.


7. Other Identifiers

For services like Firebase or OneSignal, make sure their configuration files (e.g., google-services.json for Android, GoogleService-Info.plist for iOS) are carried over correctly to maintain seamless integration.


8. App Store/Play Store Metadata

While you manage your app's metadata (description, screenshots, etc.) directly through the App Store Connect or Play Console, make sure the app’s name, icon, and identifiers match across both platforms. This ensures that users see it as an update, not a new app.


Summary Table

Platform File/Setting What to Match With Old App
iOS bundleIdentifier (Xcode, Info.plist) Old app’s bundle ID
iOS CFBundleShortVersionString, CFBundleVersion Higher than last version
iOS Signing (certs, provisioning) Same Apple Developer account
Android applicationId (build.gradle) Old app’s application ID
Android versionCode, versionName (build.gradle) Higher than last version
Android Signing (keystore) Same keystore as before
Both App icons, splash screens Your app’s branding
Both Permissions, services config Match previous settings

Final Thoughts:

Migrating your codebase while ensuring the identity of your app is preserved across both the App Store and Play Store can be challenging, but by following the above steps, you can ensure that your new React Native project gets recognized as an update rather than a new app. If you need any help finding or updating these values in your codebase, just let me know which platform you'd like to start with!

Heroku

Built for developers, by developers.

Whether you're building a simple prototype or a business-critical product, Heroku's fully-managed platform gives you the simplest path to delivering apps quickly — using the tools and languages you already love!

Learn More

Top comments (0)

Image of Quadratic

Free AI chart generator

Upload data, describe your vision, and get Python-powered, AI-generated charts instantly.

Try Quadratic free

👋 Kindness is contagious

Dive into this insightful write-up, celebrated within the collaborative DEV Community. Developers at any stage are invited to contribute and elevate our shared skills.

A simple "thank you" can boost someone’s spirits—leave your kudos in the comments!

On DEV, exchanging ideas fuels progress and deepens our connections. If this post helped you, a brief note of thanks goes a long way.

Okay