- Change App Name
- Change Package Name
- Change Launcher Icon
- Build and release an Android version
- Change iOS Bundle Name and Identifier
- Build and release an iOS version
Before publishing your app, you may want to polish it. Each app should have its own identification. Therefore, we recommend setting a unique label name, package name, and app launch icon before releasing it to the world.
Change App Name
Here are the simple steps to change the label name of your Android app:
-
Open your AndroidManifest.xml file located in the android/app/src/main directory
- Find the
<application>
tag -
Change the
android:label
attribute to the desired name for your app:1 2 3 4 5 6
<application android:requestLegacyExternalStorage="true" android:label="YourAppName" android:networkSecurityConfig="@xml/network_security_config" android:icon="@mipmap/launcher_icon"> ... </application>
Change Package Name
- Open build.gradle located in android/app directory
-
Change the
applicationId
under thedefaultConfig
to your desired package name:1 2 3 4 5 6 7
defaultConfig { applicationId "org.yourappname.app" // usually reversed company domain minSdkVersion 21 targetSdkVersion 33 versionCode flutterVersionCode.toInteger() versionName flutterVersionName }
Change Launcher Icon
The Flutter app comes with a launcher icon. To change it with your custom one, please follow the instructions:
-
Add flutter_launcher_icons plugin to your project via command line
1
flutter pub add dev:flutter_launcher_icons
Or by adding it directly to your pubspec.yaml (don’t forget to check for the latest available version)
1 2
dev_dependencies: flutter_launcher_icons: ^0.13.1
-
Prepare an icon image and place it in the assets/images folder. Replace the default launcher icon with the new one
1 2 3 4 5
flutter_icons: android: "launcher_icon" ios: true remove_alpha_ios: true image_path: "assetshttps://img.thingsboard.io/yourIcon.png"
-
In the terminal, execute the following commands:
1 2 3
flutter pub get flutter pub run flutter_launcher_icons
Commands will fetch the dependencies and then run the flutter_launcher_icons script to generate app icons for both Android and iOS platforms.
Build and release an Android version
When preparing a release version of your app, for example, for publishing it on the Google Play, follow the “Build and release an Android app” article.
1
flutter build appbundle --no-tree-shake-icons
Change iOS Bundle Name and Identifier
To change the bundle name and identifier for iOS, follow these steps:
-
Open Info-Release.plist located in ios/Runner directory. Note: there is also Info-Debug.plist which is used for debugging purposes only
-
Update
CFBundleName
key to the desired name for your app1 2
<key>CFBundleName</key> <string>YourAppName</string>
-
Update the
CFBundleIdentifier
key to your bundle identifier:1 2
<key>CFBundleIdentifier</key> <string>org.yourappname.app</string>
Build and release an iOS version
When preparing a release version of your app for publishing it on the App Store and TestFlight, follow the “Build and release an iOS app” article.
1
flutter build ipa --no-tree-shake-icons