If your project has any issues with the native folders, you can rebuild them by deleting both the ios and android directories at the root level of your project and running this command:
$ react-native eject
Running this command will check if the ios and android directories exist and then rebuild whichever one is missing.
The first time you run this command it will spit out a configuration JSON file called app.json
. By default, app.json
will have 2 properties:
{
"name": "AwesomeProject",
"displayName": "AwesomeProject"
}
You can change the project name here but updating the name
and displayName
values and running react-native eject
again.
The second time you run this command it will refer to app.json
and rebuild with the new name as the only change.
You can also change your projects app icon using the app.json
config. Simply add an icon property:
{
"name": "AwesomeProject",
"displayName": "AwesomeProject",
"icon": {
"ios": "AwesomeProject-logo-iOS.png",
"android": "AwesomeProject-logo-android.png",
"default": "AwesomeProject-logo.png"
}
}
You can use the default
property to set the app icon for both platforms, or if you need them to be different for each platform you can override default
with either the ios
or android
properties.