Renaming the application package name in React-native

Webner Solutions
1 min readJun 9, 2021

--

Renaming the application package name in React-native
Renaming the application package name in React-native

In react-native, To create a new application we use the following command:
react-native init MyApp

This command will create a package name with com.myapp. Sometimes, if your application is created with the wrong package name or bundle id or you want to release your existing application with a different package name then you can change your package name by following the below steps. So, if you want to change your package name then you need to do some changes in the following files:

Android

android/app/src/main/java/MY/APP/NEW_ID/MainActivity.java:
package MY.APP.NEW_ID;
android/app/src/main/java/MY/APP/NEW_ID/MainApplication.java:
package MY.APP.NEW_ID;
android/app/src/main/AndroidManifest.xml:
package="MY.APP.NEW_ID"
android/app/build.gradle:
applicationId "MY.APP.NEW_ID"
android/app/BUCK:
android_build_config( package="MY.APP.NEW_ID" ) android_resource( package="MY.APP.NEW_ID" )
In end clean gradle (in /android folder):
./gradlew clean

iOS

./ios/APPLICATION_NAME/info.plist :
<dict>
...
<key>CFBundleDisplayName</key>
<string>APPLICATION_NAME</string>
<key>CFBundleIdentifier</key>
<string>IOS_BUNDLE_ID</string>
...
</dict>
Clean your project after changes.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Originally published at https://blog.webnersolutions.com on June 9, 2021.

--

--

Webner Solutions
Webner Solutions

Written by Webner Solutions

Our team in Salesforce is very strong, with in-depth knowledge of Salesforce classic and Lightning development as well as the Service cloud.

No responses yet