Change App Name In React Native

前端 未结 14 770
滥情空心
滥情空心 2020-12-22 20:29

I\'m trying to figure out how to change a ReactNative app name. The installed APK on my device is simply \"App\", with the Android icon. How can I change this?

I\'ve

相关标签:
14条回答
  • 2020-12-22 21:19

    First of all: Open app.json file in your react-native project directory. And, just replace displayName json property's value in this file. e.g.:

    {
        "name": "SomethingSomething",
        "displayName": "My New App Name"
    }
    

    For Android app: Open strings.xml file, replace the <string name="app_name"> tag's value to your new app name. e.g.:

    <string name="app_name">My New App Name</string>
    

    For iOS: Open info.plist, replace the value after <key>CFBundleDisplayName</key> to your app name. e.g.:

    <key>CFBundleDisplayName</key>
    <string>My New App Name</string>
    

    Uninstall your previous app installed on your device. Use npm install in project main directory, in ios folder directory run pod install commands. Now, simply install app in your device.

    0 讨论(0)
  • 2020-12-22 21:21

    If you don't have any thing precious in your android folder, you can delete the folder then run react-native upgrade then react-native android. These will recreate AndroidManifest.xml along with necessary files and folders. (Tried on 0.18 in Windows 10)

    0 讨论(0)
提交回复
热议问题