Change app package/bundle name for Flutter projects with one command.
- Update Android
applicationId(build.gradle/build.gradle.kts). - Update Android manifest package declarations (
main,debug,profile). - Migrate Android source files under old package path to new package path.
- Update Java/Kotlin package references during migration.
- Remove empty old package directories after migration.
- Update iOS bundle identifier in
project.pbxproj. - Update OHOS bundle name in
ohos/AppScope/app.json5. - Rename all platforms at once, or one platform at a time.
Add this package to dev_dependencies:
dev_dependencies:
change_app_package_name_plus: ^1.6.0Or:
flutter pub add -d change_app_package_name_plusThen:
flutter pub getRename Android + iOS + OHOS:
dart run change_app_package_name_plus:main com.new.package.nameRename Android only:
dart run change_app_package_name_plus:main com.new.package.name --androidRename iOS only:
dart run change_app_package_name_plus:main com.new.package.name --iosRename OHOS only:
dart run change_app_package_name_plus:main com.new.package.name --ohos- If you have customized
CFBundleIdentifierinInfo.plist, update it manually. com.new.package.nameis an example. Replace it with your own package name.
This project is based on and inspired by the original project:
- Original project: https://github.com/atiqsamtia/change_app_package_name
- Original author: Atiq Samtia (https://twitter.com/atiqsamtia)
Thanks for the original implementation and open-source contribution.
MIT