
Feel free to skip to the Android section if you want to skip it. We’ll start with iOS since it’s the most involved process. Once these have been updated, we’re ready to start renaming based on the architecture, which we can do one at a time. Within the app.json and package.json files, we will start our renaming process by manually replacing our old app name with the new app name. Once you have decided what to change the name to, we start by updating the highest level files referenced within the JavaScript code itself. Since we’re updating the name manually you want to make sure to limit the characters to letters of the alphabet and underscores, but most importantly avoiding special characters like spaces or hyphens. Now we’re ready to start our renaming process! Start Renaming React-Native From the project folder, run the following command: $ cd ios & pod deintergrate & cd. For iOS, we also want to remove all of our Pods. We don’t want references to the old name interfering with our updates. If you haven’t already, install react-native-clean-project, and use it to remove all existing cache. We also need to do some cleanup or we could end up with some reference artifacts. Renaming is going to cause errors, so you don’t need more errors to cause confusion. Prior Preparationīefore we start, make sure your app has no issues building before starting. In this article, I will be loosely referencing the app’s name as “app_name” or “old_app”, and the replacement name as “newappname”, when applicable. Instead of doing a find and replace for everything, which is usually what causes problems with name changes, we’ll go through each part, so when you run into an error you’ll know exactly why. The majority of it is simply renaming files, and making sure the references are updated to match the new name. The process of changing the name of a React-Native app is fairly simple, but quite involved. As someone who has never felt this was a true solution, I wanted to find exactly what it took to make this change, and it was a lot easier than I expected. To be completely honest, renaming React-Native apps has been discouraged, so the common suggestion has been to simply make a new app with the correct name, then migrating your code. Changing the name in a React-Native app, isn’t all that straight-forward.
