Publishing Preparation
Before publishing your app to the Play Store or App Store, you need to customize its identity (package name, app name, and icon). DWallet includes CLI helper tools that make this process quick and easy.
Quick Customization Checklist
Section titled “Quick Customization Checklist”Before building for release, complete these steps:
- ✅ Change Package Name / Bundle ID
- ✅ Change App Name
- ✅ Update App Icon
- ✅ Configure Signing (Android / iOS)
Prerequisites
Section titled “Prerequisites”- Flutter SDK 3.41.0+ installed
- Project dependencies installed (
flutter pub get) - The CLI tools are already included in
dev_dependencies
Change Package Name / Bundle ID
Section titled “Change Package Name / Bundle ID”Use the change_app_package_name CLI tool (already included in dev_dependencies):
Change for All Platforms
Section titled “Change for All Platforms”dart run change_app_package_name:main com.baselyr.yourappChange Only Android
Section titled “Change Only Android”dart run change_app_package_name:main com.baselyr.yourapp --androidChange Only iOS
Section titled “Change Only iOS”dart run change_app_package_name:main com.baselyr.yourapp --iosExample - changing from default to your package:
# Change package name to com.baselyr.financeappdart run change_app_package_name:main com.baselyr.financeapp
# Output:# ✅ Android package name updated# ✅ iOS bundle identifier updatedChange App Name
Section titled “Change App Name”Use the rename_app CLI tool (already included in dev_dependencies):
Same Name for All Platforms
Section titled “Same Name for All Platforms”dart run rename_app:main all="Your App Name"Platform-Specific Names
Section titled “Platform-Specific Names”dart run rename_app:main android="Android App Name" ios="iOS App Name" others="Other Platforms"Individual Platforms
Section titled “Individual Platforms”# Android onlydart run rename_app:main android="Finance App"
# iOS onlydart run rename_app:main ios="Finance"
# Web onlydart run rename_app:main web="Finance Web"
# Windows onlydart run rename_app:main windows="Finance Desktop"
# Linux onlydart run rename_app:main linux="Finance Linux"
# macOS onlydart run rename_app:main mac="Finance Mac"Update App Icon
Section titled “Update App Icon”Use the flutter_launcher_icons CLI tool (already included in dev_dependencies):
1. Prepare Your Icon
Section titled “1. Prepare Your Icon”Place your app icon at assets/app/app_launcher.png:
- Recommended size: 1024×1024px
- Format: PNG
- Android: Will generate adaptive icons (foreground + background)
- iOS: Will generate all required icon sizes
2. Configure Icons
Section titled “2. Configure Icons”The configuration is already set up in flutter_launcher_icons.yaml:
flutter_launcher_icons: android: true ios: true image_path: "assets/app/app_launcher.png"
# Android Adaptive Icons min_sdk_android: 21 adaptive_icon_background: "#FFFFFF" adaptive_icon_foreground: "assets/app/app_launcher.png"
# iOS Settings remove_alpha_ios: true3. Generate Icons
Section titled “3. Generate Icons”Run the icon generator:
dart run flutter_launcher_icons -f flutter_launcher_icons.yamlOutput:
════════════════════════════════════════════ FLUTTER LAUNCHER ICONS (v0.14.4)════════════════════════════════════════════
• Creating default icons Android• Creating adaptive icons Android• Overwriting the default Android launcher icon with a new icon• Overwriting default iOS launcher icon with new iconVerification
Section titled “Verification”After running the tools, verify your changes:
Android
Section titled “Android”# Check package namegrep "applicationId" android/app/build.gradle.kts# Output: applicationId = "com.baselyr.yourapp"
# Check app namegrep "android:label" android/app/src/main/AndroidManifest.xml# Output: android:label="Your App Name"
# Check icons existls android/app/src/main/res/mipmap-*/ic_launcher.png# Check bundle identifiercat ios/Runner.xcodeproj/project.pbxproj | grep "PRODUCT_BUNDLE_IDENTIFIER" | head -1# Output: PRODUCT_BUNDLE_IDENTIFIER = com.baselyr.yourapp;
# Check app namecat ios/Runner/Info.plist | grep -A1 "CFBundleDisplayName"# Output: <string>Your App Name</string>
# Check icons existls ios/Runner/Assets.xcassets/AppIcon.appiconset/Complete Example Workflow
Section titled “Complete Example Workflow”Here’s a complete example of customizing your app for publication:
# 1. Change package name to com.baselyr.financeappdart run change_app_package_name:main com.baselyr.financeapp
# 2. Change app name to "Finance Pro"dart run rename_app:main all="Finance Pro"
# 3. Generate icons (assuming app_launcher.png is ready)dart run flutter_launcher_icons -f flutter_launcher_icons.yaml
# 4. Verify all changesecho "=== Package Name ==="grep "applicationId" android/app/build.gradle.ktsecho "=== App Name (Android) ==="grep "android:label" android/app/src/main/AndroidManifest.xmlecho "=== Icons ==="ls android/app/src/main/res/mipmap-mdpi/ic_launcher.pngNext Steps
Section titled “Next Steps”Once you’ve customized your app identity:
-
Configure Signing:
- Android Signing Configuration - Set up release keystore
- iOS Signing Configuration - Configure certificates in Xcode
Note: The Android build is pre-configured with conditional signing. Simply create your
key.propertiesfile and the build will automatically use your keystore. No code changes needed! -
Test Your Build:
- Run the app on a physical device
- Verify the icon appears correctly
- Check the app name displays properly
-
Build for Release:
Troubleshooting
Section titled “Troubleshooting”Package Name Change Failed
Section titled “Package Name Change Failed”Issue: Directory already exists or permission denied Solution:
# Clean and retryflutter cleandart run change_app_package_name:main com.baselyr.yourappIcons Not Generating
Section titled “Icons Not Generating”Issue: Image file not found or invalid format Solution:
- Ensure image exists at
assets/app/app_launcher.png - Verify image is PNG format
- Check image dimensions are at least 1024×1024px
App Name Not Updating
Section titled “App Name Not Updating”Issue: Previous name cached Solution:
# Android: Uninstall and reinstallflutter cleanflutter pub getflutter run
# iOS: Clean build folder in Xcode# Product → Clean Build Folder (Cmd+Shift+K)Related Guides
Section titled “Related Guides”- Project Structure - Understand the codebase
- Android Signing - Configure release signing
- iOS Signing - Configure certificates
- Installation - Build instructions