flutter-app-config
Scannednpx machina-cli add skill nylo-core/claude-code/flutter-app-config --openclawFlutter App Configuration
Overview
Changing a Flutter app's name, bundle identifier, or package name requires modifying multiple platform-specific files. A missed file causes build failures or store rejection. This skill covers every file that needs updating on both iOS and Android.
When to Use
- User wants to change the app display name (what appears under the icon)
- User wants to change the iOS bundle identifier (e.g.,
com.company.appName) - User wants to change the Android application ID / package name (e.g.,
com.company.app_name) - User is preparing an app for release and needs correct identifiers
- User is cloning/forking a project and needs to rebrand it
- NOT for changing the Dart package name in
pubspec.yamlalone (that only affects Dart imports)
Quick Reference
| What to Change | iOS Files | Android Files |
|---|---|---|
| Display name | ios/Runner/Info.plist → CFBundleDisplayName, CFBundleName | android/app/src/main/AndroidManifest.xml → android:label |
| Bundle ID / App ID | ios/Runner.xcodeproj/project.pbxproj → PRODUCT_BUNDLE_IDENTIFIER | android/app/build.gradle → applicationId (or namespace in newer Gradle) |
| Package name (Android) | N/A | AndroidManifest.xml → package, Kotlin/Java directory structure, build.gradle → namespace |
Changing the App Display Name
The display name is what users see under the app icon on their home screen.
iOS
Edit ios/Runner/Info.plist:
<key>CFBundleDisplayName</key>
<string>My App Name</string>
<key>CFBundleName</key>
<string>My App Name</string>
CFBundleDisplayName— the name shown on the home screen (primary)CFBundleName— short bundle name, used in places where space is limited (max 15 characters recommended)- If
CFBundleDisplayNameis not present, iOS falls back toCFBundleName
Android
Edit android/app/src/main/AndroidManifest.xml:
<application
android:label="My App Name"
...>
The android:label attribute on the <application> tag sets the app name displayed on the launcher.
Changing the Bundle Identifier (iOS)
The bundle identifier uniquely identifies your app on iOS (e.g., com.company.myApp).
Files to Modify
1. ios/Runner.xcodeproj/project.pbxproj
Search for all occurrences of PRODUCT_BUNDLE_IDENTIFIER and replace:
PRODUCT_BUNDLE_IDENTIFIER = com.newcompany.newAppName;
There are typically 3-6 occurrences — one for each build configuration (Debug, Release, Profile) for each target. Update ALL of them.
2. ios/Runner/Info.plist (if explicitly set)
Check for a hardcoded CFBundleIdentifier. By default it uses $(PRODUCT_BUNDLE_IDENTIFIER) which reads from the project file:
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
If it contains a hardcoded value instead of $(PRODUCT_BUNDLE_IDENTIFIER), update it.
Verification
After changing, verify with:
grep -r "PRODUCT_BUNDLE_IDENTIFIER" ios/Runner.xcodeproj/project.pbxproj
All results should show the new identifier.
Changing the Application ID (Android)
Modern Approach (AGP 7.0+ / Gradle Kotlin DSL)
1. android/app/build.gradle (or build.gradle.kts)
android {
namespace "com.newcompany.new_app_name"
defaultConfig {
applicationId "com.newcompany.new_app_name"
...
}
}
applicationId— uniquely identifies the app on Google Play (the "application ID")namespace— used for R class and BuildConfig generation (AGP 7.0+)
2. android/app/src/main/AndroidManifest.xml
In older projects, the package attribute is set:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.newcompany.new_app_name">
In newer Flutter projects using AGP 7.0+, the package attribute may be removed from the manifest (replaced by namespace in build.gradle). If present, update it to match.
3. Kotlin/Java Source Directory Structure
The main activity file lives in a directory matching the package name:
android/app/src/main/kotlin/com/newcompany/new_app_name/MainActivity.kt
Steps:
- Create the new directory structure matching the new package name
- Move
MainActivity.kt(orMainActivity.java) to the new path - Update the
packagedeclaration at the top of the file:
package com.newcompany.new_app_name
- Delete the old empty directories
4. android/app/src/debug/AndroidManifest.xml and android/app/src/profile/AndroidManifest.xml
These overlay manifests may also contain the old package name. Check and update if present.
Verification
# Check all references to old package name
grep -r "com.oldcompany.old_app_name" android/
All results should be eliminated or updated.
Using rename_app_flutter Package (Automated Approach)
The rename_app_flutter package automates most of the renaming process.
Installation and Usage
# Add as dev dependency
flutter pub add rename_app_flutter --dev
# Change app name (display name on both platforms)
dart run rename_app_flutter:main all="My New App Name"
# Change bundle ID for iOS
dart run rename_app_flutter:main ios_id="com.newcompany.newApp"
# Change application ID for Android
dart run rename_app_flutter:main android_id="com.newcompany.new_app"
# Change everything at once
dart run rename_app_flutter:main all="My New App Name" android_id="com.newcompany.new_app" ios_id="com.newcompany.newApp"
Alternative: change_app_package_name
For Android package name changes specifically:
flutter pub add change_app_package_name --dev
dart run change_app_package_name:main com.newcompany.new_app_name
This handles:
build.gradleapplicationId and namespaceAndroidManifest.xmlpackage attribute- Kotlin/Java directory structure and package declarations
After Automated Rename
Always verify after running any automated tool:
# Rebuild to ensure no broken references
flutter clean
flutter pub get
flutter build ios --no-codesign # Test iOS build
flutter build apk # Test Android build
Full Rename Checklist
When doing a complete rebrand (new name + new identifiers):
pubspec.yaml— updatename:(Dart package name, snake_case, affects imports)pubspec.yaml— updatedescription:- iOS
Info.plist— updateCFBundleDisplayNameandCFBundleName - iOS
project.pbxproj— update allPRODUCT_BUNDLE_IDENTIFIERentries - Android
build.gradle— updateapplicationIdandnamespace - Android
AndroidManifest.xml— updatepackageattribute andandroid:label - Android source directory — rename directory structure to match new package
- Android
MainActivity.kt— updatepackagedeclaration - Debug/Profile manifests — check and update if they reference the old package
- Firebase config (if applicable):
ios/Runner/GoogleService-Info.plist— re-download from Firebase consoleandroid/app/google-services.json— re-download from Firebase console
- Deep links / URL schemes — update any custom URL scheme configurations
flutter clean && flutter pub get— rebuild from clean state
Platform-Specific File Paths Summary
iOS Files
| File | Keys/Fields |
|---|---|
ios/Runner/Info.plist | CFBundleDisplayName, CFBundleName, CFBundleIdentifier |
ios/Runner.xcodeproj/project.pbxproj | PRODUCT_BUNDLE_IDENTIFIER (all occurrences) |
Android Files
| File | Keys/Fields |
|---|---|
android/app/build.gradle | applicationId, namespace |
android/app/src/main/AndroidManifest.xml | package, android:label |
android/app/src/main/kotlin/.../MainActivity.kt | package declaration |
android/app/src/debug/AndroidManifest.xml | package (if present) |
android/app/src/profile/AndroidManifest.xml | package (if present) |
Common Mistakes
-
Missing occurrences in project.pbxproj — There are multiple
PRODUCT_BUNDLE_IDENTIFIERentries (Debug, Release, Profile). Missing one causes builds to fail for that configuration. Always search and replace ALL occurrences. -
Not updating Android directory structure — Changing
applicationIdin build.gradle but leavingMainActivity.ktin the old directory path causesClassNotFoundExceptionat runtime. -
Forgetting the namespace in build.gradle — On AGP 7.0+,
namespaceis separate fromapplicationId. If you only changeapplicationId, the R class and BuildConfig still reference the old namespace. -
Case sensitivity mismatch — iOS bundle IDs are case-sensitive.
com.Company.Appandcom.company.appare different identifiers. Android application IDs should be lowercase. -
Not cleaning after rename — Old cached artifacts cause confusing errors. Always run
flutter clean && flutter pub getafter renaming. -
Firebase config mismatch — If the project uses Firebase, the bundle ID / application ID in
GoogleService-Info.plistandgoogle-services.jsonmust match exactly. Re-download these files from the Firebase console after changing identifiers. -
Changing pubspec.yaml name without updating imports — The
namefield in pubspec.yaml affects Dart package imports. If you change it fromold_nametonew_name, everyimport 'package:old_name/...'must be updated toimport 'package:new_name/...'. -
Android package name with hyphens — Android package names cannot contain hyphens. Use underscores:
com.company.my_appnotcom.company.my-app. -
iOS bundle ID starting with number — Each component of an iOS bundle identifier must start with a letter.
com.company.2048gameis invalid; usecom.company.game2048.
Source
git clone https://github.com/nylo-core/claude-code/blob/main/skills/flutter-app-config/SKILL.mdView on GitHub Overview
Changing a Flutter app’s name, bundle identifier, or package name requires updating multiple platform-specific files. This skill covers all the iOS and Android files that must be edited to avoid build failures or store rejections, ensuring a consistent rebrand.
How This Skill Works
The skill guides you to identify the display name, bundle/app IDs, and Android package changes, then updates the corresponding iOS and Android files (e.g., Info.plist, project.pbxproj, AndroidManifest.xml, build.gradle). It emphasizes checking all occurrences and verifying changes to prevent mismatches across configurations.
When to Use It
- Change the app display name
- Change the iOS bundle identifier (PRODUCT_BUNDLE_IDENTIFIER)
- Change the Android application ID / package name
- Prepare an app for release with correct identifiers
- Clone or fork a project and apply a rebrand
Quick Start
- Step 1: Identify the target display name, iOS bundle ID, and Android applicationId/namespace
- Step 2: Update ios/Runner/Info.plist, ios/Runner.xcodeproj/project.pbxproj, and AndroidManifest.xml + build.gradle
- Step 3: Verify changes (grep for PRODUCT_BUNDLE_IDENTIFIER, check applicationId/namespace) and run builds on both platforms
Best Practices
- Update all relevant file occurrences (3-6 in pbxproj, multiple in Gradle) to keep identifiers in sync
- Do not rely on a single file; verify both iOS and Android configurations after changes
- Use a grep or search approach to confirm PRODUCT_BUNDLE_IDENTIFIER and related fields
- Maintain a consistent display name across launcher, App Store/Play Store, and in-app references
- Test builds on both iOS and Android to catch platform-specific issues early
Example Use Cases
- Renaming 'My App' to 'Nova Notes' by updating Info.plist and AndroidManifest.xml and Gradle settings
- Rebranding a fork with new com.company.oldapp to com.company.newapp across iOS and Android
- Preparing a Flutter app for Play Store submission by aligning applicationId and namespace
- Cloning a starter app and applying a new display name and bundle IDs to avoid conflicts
- Resolving launcher name discrepancies after switching from debug to release configurations