How to Change App Name in React Native

MD Aminul Islam Feb 02, 2024
  1. Install Necessary CLI
  2. Rename the App Name
How to Change App Name in React Native

Sometimes we need to rename the app for numerous purposes. But manually changing the app name is not an easy task.

You need to go through all files that contain the app name one by one and rename each of them. But there is a way to automate this task.

In this article, we will see how we can change the app name for a React-Native app. Also, we will discuss the topic one by one so that it can be easy to understand.

Here we will use the react-native-rename tool to change the app name in React-Native. Just follow the below steps to rename your app.

Install Necessary CLI

For this purpose, we need a react-native-rename. You can easily download it by using the command below.

npm install react-native-rename -g

If you have successfully installed the tool, you will get the below output in your console.

npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@npmjs.com for more info.
C:\Users\Md. Aminul Islam\AppData\Roaming\npm\react-native-rename -> C:\Users\Md. Aminul Islam\AppData\Roaming\npm\node_modules\react-native-rename\lib\index.js
+ react-native-rename@2.9.0
added 81 packages from 58 contributors in 24.136s

Rename the App Name

After successfully installing the above-required tool, you can easily change the app’s name by using the command below.

react-native-rename NewAppName

The general syntax for the above command is like react-native-rename YOUR_APP_NAME.

After running the above command, you will see that all the files containing the previous file name are changed with the new one.

Please note that the code shared above is created in React-Native, and we used the Expo-CLI to run the app.

Also, you need the latest version of Node.js. Install it if you don’t have Expo-CLI in your environment.

MD Aminul Islam avatar MD Aminul Islam avatar

Aminul Is an Expert Technical Writer and Full-Stack Developer. He has hands-on working experience on numerous Developer Platforms and SAAS startups. He is highly skilled in numerous Programming languages and Frameworks. He can write professional technical articles like Reviews, Programming, Documentation, SOP, User manual, Whitepaper, etc.

LinkedIn

Related Article - React Native