230
votes

I have created the app using Flutter create testapp. Now, I want to change the app name from "testapp" to "My Trips Tracker". How can I do that?

I have tried changing from the AndroidManifest.xml, and it got changed, but is there a way that Flutter provides to do that?

14
The manifest is the only way to change the name that is shown in the Settings app and the name shown on your launcher icon.CommonsWare
For visual people this video will show you the whole process youtube.com/watch?v=05twEATiS44Infinite Looper

14 Answers

209
votes

UPDATE: From the comments this answer seems to be out of date

The Flutter documentation points out where you can change the display name of your application for both Android and iOS. This may be what you are looking for:

For Android

It seems you have already found this in the AndroidManifest.xml as the application entry.

Review the default App Manifest file AndroidManifest.xml located in /android/app/src/main/ and verify the values are correct, especially:

application: Edit the android:label in the application tag to reflect the final name of the app.

For iOS

See the Review Xcode project settings section:

Navigate to your target’s settings in Xcode:

In Xcode, open Runner.xcworkspace in your app’s ios folder.

To view your app’s settings, select the Runner project in the Xcode project navigator. Then, in the main view sidebar, select the Runner target.

Select the General tab. Next, you’ll verify the most important settings:

Display Name: the name of the app to be displayed on the home screen and elsewhere.

339
votes

Android

Open AndroidManifest.xml (located at android/app/src/main)

<application
    android:label="App Name" ...> // Your app name here

iOS

Open info.plist (located at ios/Runner)

<key>CFBundleName</key>
<string>App Name</string> // Your app name here

Don't forget to run

flutter clean
34
votes

There is a plugin, flutter_launcher_name.

Write file pubspec.yaml:

dev_dependencies:
  flutter_launcher_name: "^0.0.1"

flutter_launcher_name:
  name: "yourNewAppLauncherName"

And run:

flutter pub get
flutter pub run flutter_launcher_name:main

You can get the same result as editing AndroidManifes.xml and Info.plist.

32
votes

You can change it in iOS without opening Xcode by editing the project/ios/Runner/info.plist <key>CFBundleDisplayName</key> to the String that you want as your name.

FWIW - I was getting frustrated with making changes in Xcode and Flutter, so I started committing all changes before opening Xcode, so I could see where the changes show up in the Flutter project.

14
votes
  • Review the default app manifest file, AndroidManifest.xml, located in <app dir>/android/app/src/main

  • Edit the android:label to your desired display name

9
votes

There are several possibilities:

1- The use of a package:

I suggest you to use flutter_launcher_name because of the command-line tool which simplifies the task of updating your Flutter app's launcher name.

Usage:

Add your Flutter Launcher name configuration to your pubspec.yaml file:

dev_dependencies:
  flutter_launcher_name: "^0.0.1"

flutter_launcher_name:
  name: "yourNewAppLauncherName"

After setting up the configuration, all that is left to do is run the package.

flutter pub get
flutter pub run flutter_launcher_name:main

If you use this package, you don't need modify file AndroidManifest.xml or Info.plist.

2- Edit AndroidManifest.xml for Android and info.plist for iOS

For Android, edit only android:label value in the application tag in file AndroidManifest.xml located in the folder: android/app/src/main

Code:

<manifest xmlns:android="http://schemas.android.com/apk/res/android">
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="Your Application Name"  //here
        android:icon="@mipmap/ic_launcher">
        <activity>
        <!--  -->
        </activity>
    </application>
</manifest>

Screenshot:

Enter image description here

For iOS, edit only the value inside the String tag in file Info.plist located in the folder ios/Runner .

Code:

<plist version="1.0">
<dict>
    <key>CFBundleName</key>
    <string>Your Application Name </string>  //here
</dict>
</plist>

Screenshot:

Enter image description here

Do a flutter clean and restart your application if you have a problem.

8
votes

By default, when a flutter app gets installed, the app name on the launcher is your Flutter project name. To change that to your desired application name on Android or iOS both, you need to change AndroidManifest.xml and Info.plist respectively. here is a two way to achieve this

1 By plugin

You can use a flutter rename plugin. It helps you to change your flutter project's AppName and BundleId for different platforms, currently only available for iOS, Android and macOS

You can change the bundleId and appName in the following steps

Default Usage if you dont pass -t or --target parameter it will try to rename all available platform project folders inside flutter project.

Run this command inside your flutter project root.

pub global run rename --bundleId com.onatcipli.networkUpp
pub global run rename --appname "Test App Name"

Custom Usage if you want to run commands directly (without using pub global run) ensure you add system catche bin directory to your path

rename --appname yourappname -t ios

or

pub global run rename --appname yourappname --target macOS

To target a specific platform use the "--target" option. e.g.

pub global run rename --bundleId com.example.android.app --target android

2 By manual

For Android

App Name is reflected under Android>src>main>Androidmanifest.xml The label name in the Android manifest is responsible for giving the App Name for Android Application

Go to AndroidManifest.xml, find <application> tag. Change its android:label property with your desired app name.

Navigate to the : android/app/src/main/AndroidManifest.xml

enter image description here

The Androidmanifest.xml can now be modified. Choose the

<application
  android:name="io.flutter.app.FlutterApplication"
  android:label="YourAppName"
  android:icon="@mipmap/ic_launcher">

For Package Name

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="your.package.name">

This portion represents the actual Android file naming system. Important information like Launcher Icon and App name can be controlled here. Modify the android:label to change the App Name only.

For iOS

For iOS, open info.plist. Change CFBundleName (Bundle Name).

Go to the Xcode project folder and open Info.plist for edit (in Xcode you can choose Open As > Source Code in the file context menu). All we need is to edit the value for key CFBundleName. It’s a user-visible short name for the bundle.

Navigate to the: project/ios/Runner/Info.plist

enter image description here

Find the CFBundleName <key>. This denotes the Key that holds the app name. The app name now can be changed by modifying the <String> </String> below that.

<key>CFBundleName</key>
<string>YouAppName</string>

That’s it. By having these changes, That’s achieved, an updated application name in the launcher when an app gets installed on a device. your new app name will be displayed on your phone now.

7
votes

You can change it in iOS without opening Xcode by editing file *project/ios/Runner/info.plist. Set <key>CFBundleDisplayName</key> to the string that you want as your name.

For Android, change the app name from the Android folder, in the AndroidManifest.xml file, android/app/src/main. Let the android label refer to the name you prefer, for example,

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application
        android:label="test"
        // The rest of the code
    </application>
</manifest>
5
votes

One problem is that in iOS Settings (iOS 12.x) if you change the Display Name, it leaves the app name and icon in iOS Settings as the old version.

3
votes

For Android, change the app name from the Android folder. In the AndroidManifest.xml file, in folder android/app/src/main, let the android label refer to the name you prefer, for example,

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    <application
        `android:label="myappname"`
        // The rest of the code
    </application>
</manifest>
2
votes

As of 2019-12-21, you need to change the name [NameOfYourApp] in file pubspec.yaml. Then go to menu EditFindReplace in Path, and replace all occurrences of your previous name.

Also, just for good measure, change the folder names in your android directory, e.g. android/app/src/main/java/com/example/yourappname.

Then in the console, in your app's root directory, run

flutter clean
0
votes

First Rename your AndroidManifest.xml file

android:label="Your App Name"

Second Rename Your Application Name in Pubspec.yaml file name: Your Application Name

Third Change Your Application logo

flutter_icons:
   android: "launcher_icon"
   ios: true
   image_path: "assets/path/your Application logo.formate"

Fourth Run

flutter pub pub run flutter_launcher_icons:main
0
votes

A few of the answers here suggest using the package flutter_launcher_name, but this package is no longer being maintained and will result in dependency issues within new Flutter 2.0 projects.

The plugin flutter_app_name (https://pub.dev/packages/flutter_app_name) is a nearly identical package that has sound null safety and will work with Flutter 2.0.

  1. Set your dev dependencies and your app's name
dev_dependencies:
  flutter_app_name: ^0.1.1

flutter_app_name:
  name: "My Cool App"
  1. Run flutter_app_name in your project's directory
flutter pub get
flutter pub run flutter_app_name

Your launcher will now have the name of "My Cool App".

-1
votes

The way of changing the name for iOS and Android is clearly mentioned in the documentation as follows:

But, the case of iOS after you change the Display Name from Xcode, you are not able to run the application in the Flutter way, like flutter run.

Because the Flutter run expects the app name as Runner. Even if you change the name in Xcode, it doesn't work.

So, I fixed this as follows:

Move to the location on your Flutter project, ios/Runner.xcodeproj/project.pbxproj, and find and replace all instances of your new name with Runner.

Then everything should work in the flutter run way.

But don't forget to change the name display name on your next release time. Otherwise, the App Store rejects your name.