Skip to content

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.

Before building for release, complete these steps:

  1. ✅ Change Package Name / Bundle ID
  2. ✅ Change App Name
  3. ✅ Update App Icon
  4. ✅ Configure Signing (Android / iOS)
  • Flutter SDK 3.41.0+ installed
  • Project dependencies installed (flutter pub get)
  • The CLI tools are already included in dev_dependencies

Use the change_app_package_name CLI tool (already included in dev_dependencies):

Terminal window
dart run change_app_package_name:main com.baselyr.yourapp
Terminal window
dart run change_app_package_name:main com.baselyr.yourapp --android
Terminal window
dart run change_app_package_name:main com.baselyr.yourapp --ios

Example - changing from default to your package:

Terminal window
# Change package name to com.baselyr.financeapp
dart run change_app_package_name:main com.baselyr.financeapp
# Output:
# ✅ Android package name updated
# ✅ iOS bundle identifier updated

Use the rename_app CLI tool (already included in dev_dependencies):

Terminal window
dart run rename_app:main all="Your App Name"
Terminal window
dart run rename_app:main android="Android App Name" ios="iOS App Name" others="Other Platforms"
Terminal window
# Android only
dart run rename_app:main android="Finance App"
# iOS only
dart run rename_app:main ios="Finance"
# Web only
dart run rename_app:main web="Finance Web"
# Windows only
dart run rename_app:main windows="Finance Desktop"
# Linux only
dart run rename_app:main linux="Finance Linux"
# macOS only
dart run rename_app:main mac="Finance Mac"

Use the flutter_launcher_icons CLI tool (already included in dev_dependencies):

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

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: true

Run the icon generator:

Terminal window
dart run flutter_launcher_icons -f flutter_launcher_icons.yaml

Output:

════════════════════════════════════════════
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 icon

After running the tools, verify your changes:

Terminal window
# Check package name
grep "applicationId" android/app/build.gradle.kts
# Output: applicationId = "com.baselyr.yourapp"
# Check app name
grep "android:label" android/app/src/main/AndroidManifest.xml
# Output: android:label="Your App Name"
# Check icons exist
ls android/app/src/main/res/mipmap-*/ic_launcher.png
Terminal window
# Check bundle identifier
cat ios/Runner.xcodeproj/project.pbxproj | grep "PRODUCT_BUNDLE_IDENTIFIER" | head -1
# Output: PRODUCT_BUNDLE_IDENTIFIER = com.baselyr.yourapp;
# Check app name
cat ios/Runner/Info.plist | grep -A1 "CFBundleDisplayName"
# Output: <string>Your App Name</string>
# Check icons exist
ls ios/Runner/Assets.xcassets/AppIcon.appiconset/

Here’s a complete example of customizing your app for publication:

Terminal window
# 1. Change package name to com.baselyr.financeapp
dart 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 changes
echo "=== Package Name ==="
grep "applicationId" android/app/build.gradle.kts
echo "=== App Name (Android) ==="
grep "android:label" android/app/src/main/AndroidManifest.xml
echo "=== Icons ==="
ls android/app/src/main/res/mipmap-mdpi/ic_launcher.png

Once you’ve customized your app identity:

  1. Configure Signing:

    Note: The Android build is pre-configured with conditional signing. Simply create your key.properties file and the build will automatically use your keystore. No code changes needed!

  2. Test Your Build:

    • Run the app on a physical device
    • Verify the icon appears correctly
    • Check the app name displays properly
  3. Build for Release:

Issue: Directory already exists or permission denied Solution:

Terminal window
# Clean and retry
flutter clean
dart run change_app_package_name:main com.baselyr.yourapp

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

Issue: Previous name cached Solution:

Terminal window
# Android: Uninstall and reinstall
flutter clean
flutter pub get
flutter run
# iOS: Clean build folder in Xcode
# Product → Clean Build Folder (Cmd+Shift+K)