Jats1596
Jats1596

Reputation: 1215

Change package name and app name in react native

Hi how can I change the package name and the name that will be displayed on the phone in react-native ? I've tried to change the name in app.json and package.json and then delete android and ios folders but when I want to regenerate these folders with react-native upgrade it doesn't work..

Thanks.

Upvotes: 2

Views: 7869

Answers (3)

Hossein Mohammadi
Hossein Mohammadi

Reputation: 1473

To change app name and package name, run this command

react-native-rename "MyApp" -b com.mycompany.myapp

Upvotes: 0

Jasur Kurbanov
Jasur Kurbanov

Reputation: 840

1) Install

yarn global add react-native-rename
or
npm install react-native-rename -g

2) Rename your project

react-native-rename "New Project Name"

For more details click here

Upvotes: 1

Vignesh V Pai
Vignesh V Pai

Reputation: 829

Are you referring to the app's name that'll be displayed on the phone?

For iOS, you can edit the name directly in XCode. See this answer.

For Android, you can edit the app name in strings.xml file located at android/app/src/main/res/values/strings.xml.

<string name="app_name">Your app's name</string>

Upvotes: 8

Related Questions