Skip to content

Instantly share code, notes, and snippets.

@mayank-shekhar
Created February 16, 2018 07:28
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mayank-shekhar/73446ac5f3b2cdb32869e4d466208dcc to your computer and use it in GitHub Desktop.
Save mayank-shekhar/73446ac5f3b2cdb32869e4d466208dcc to your computer and use it in GitHub Desktop.
Rename App ID and Package name for a React Native App.
For Android:
Manually change it in android/app/src/main/java/com/PROJECT_NAME/MainActivity.java:
package MY.APP.ID;
In android/app/src/main/java/com/PROJECT_NAME/MainApplication.java:
package MY.APP.ID;
In android/app/src/main/AndroidManifest.xml:
package="MY.APP.ID"
In android/app/build.gradle:
applicationId "MY.APP.ID"
Gradle' cleaning in the end (in /android folder):
./gradlew clean
For iOS:
Change the Bundle Id in Xcode.
@VamshiKyra
Copy link

I am trying to change my application package name in Android. But these did not worked for me

@edreyyo
Copy link

edreyyo commented Sep 26, 2018

You may also need to rename the folder in which MainActivity.java and MainApplication.java are stored. For example, app/src/main/java/com/myoldbundle/ should become app/src/main/java/com/mynewbundle/

Copy link

ghost commented Oct 5, 2018

Try here but without touching strings.xml

Copy link

ghost commented Oct 16, 2018

Thanks, it works for me.

@Allan-Nava
Copy link

It works?

@ashwanimm
Copy link

I am facing issue with changing the Bundle Identifier for IOS. I changed in Xcode (to com.securegate) but when I am running the IOS simulator from Command line (react-native run-ios) then at the end it still points to older Bundle identifier (org.reactjs.native.example.securegate):

Installing build/Build/Products/Debug-iphonesimulator/securegate.app
Launching org.reactjs.native.example.securegate
org.reactjs.native.example.securegate: 49881

Please can anyone help. Thanks.

@lucaspiressimao
Copy link

I am facing issue with changing the Bundle Identifier for IOS. I changed in Xcode (to com.securegate) but when I am running the IOS simulator from Command line (react-native run-ios) then at the end it still points to older Bundle identifier (org.reactjs.native.example.securegate):

Installing build/Build/Products/Debug-iphonesimulator/securegate.app
Launching org.reactjs.native.example.securegate
org.reactjs.native.example.securegate: 49881

Please can anyone help. Thanks.

Same here ... any help plz

@yash-atreya
Copy link

I am facing issue with changing the Bundle Identifier for IOS. I changed in Xcode (to com.securegate) but when I am running the IOS simulator from Command line (react-native run-ios) then at the end it still points to older Bundle identifier (org.reactjs.native.example.securegate):

Installing build/Build/Products/Debug-iphonesimulator/securegate.app
Launching org.reactjs.native.example.securegate
org.reactjs.native.example.securegate: 49881

Please can anyone help. Thanks.

Try using this : https://github.com/kyle-ssg/react-native-app-id

@flyskywhy
Copy link

@BobsonTheFirst
Copy link

https://github.com/junedomingo/react-native-rename works well

Nice, worked very well!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment