- Using Make Commands
- Renaming the Application
- Script Dependencies
- Using
package_renameDirectly - Variables
The following make commands are available to facilitate application configuration:
- Renaming Application:
make rename-package PACKAGE_NAME=com.example.newapp BUNDLE_ID=com.example.newapp ANDROID_APP_NAME="New App" IOS_APP_NAME="New App"
- Generating package rename configuration:
make generate-package-config
- Adding and running package rename tool:
make rename-package
To update the package name, bundle ID, and application name for Android and iOS, run the following command:
make rename-package PACKAGE_NAME=com.webtrit.newapp BUNDLE_ID=com.webtrit.newapp ANDROID_APP_NAME="WebTrit" IOS_APP_NAME="WebTrit"This script is based on the package_rename package, which facilitates renaming default fields for each platform project within the WebTrit Phone application.
If you prefer to use package_rename manually, follow these steps:
- Add
package_renameas a development dependency:dart pub add package_rename --dev
- Create a
package_rename_config.yamlfile with the following content:package_rename_config: android: app_name: "New App" package_name: com.webtrit.newapp override_old_package: com.webtrit.app # N lang: kotlin ios: app_name: "New App" package_name: com.webtrit.newapp
- Run the rename command:
dart run package_rename
PACKAGE_NAME- Android package nameBUNDLE_ID- iOS bundle IDANDROID_APP_NAME- Android application nameIOS_APP_NAME- iOS application name
These commands automate the renaming process and ensure consistent configuration across platforms.