Change App Name In React Native

前端 未结 14 842
滥情空心
滥情空心 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 tag's value to your new app name. e.g.:

    My New App Name
    

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

    CFBundleDisplayName
    My New App Name
    

    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.

提交回复
热议问题