App Namer Commands

The namer command group manages your Flutter app’s display name across all platforms. It provides both universal naming (same name for all platforms) and platform-specific naming capabilities with automatic backup and rollback features.

Overview

fdawg namer [subcommand] [options] [arguments]

The namer commands update platform-specific configuration files to set your app’s display name consistently across Android, iOS, macOS, Linux, Windows, and Web platforms.

Available Subcommands

get / list - Get Current App Names

Retrieves the current app names from all or specific platforms.

fdawg namer get [--platforms <platform-list>]
fdawg namer list [--platforms <platform-list>]

Options:

  • --platforms, -p: Comma-separated list of platforms (android, ios, macos, linux, windows, web)

Examples:

# Get names from all available platforms
fdawg namer list

# Get names from specific platforms
fdawg namer get --platforms android,ios,web

Example Output:

Current App Names:
βœ“ Android: My Flutter App
βœ“ iOS: My Flutter App  
βœ“ macOS: My Flutter App
βœ“ Linux: my_flutter_app
βœ“ Windows: my_flutter_app
βœ“ Web: My Flutter App

Platforms found: 6/6

set - Set App Names

Sets app names universally across all platforms or for specific platforms.

fdawg namer set [options]

Universal Options:

  • --value, -v: App name to set across all platforms
  • --platforms, -p: Limit universal setting to specific platforms

Platform-Specific Options:

  • --android: App name for Android only
  • --ios: App name for iOS only
  • --macos: App name for macOS only
  • --linux: App name for Linux only
  • --windows: App name for Windows only
  • --web: App name for Web only

Examples:

Universal Naming

# Set same name for all platforms
fdawg namer set --value "My Awesome App"

# Set same name for specific platforms only
fdawg namer set --value "Mobile App" --platforms android,ios

Platform-Specific Naming

# Set different names for different platforms
fdawg namer set --android "Android App" --ios "iOS App" --web "Web App"

# Mix universal and platform-specific
fdawg namer set --value "My App" --android "Android Version" --ios "iOS Version"

Complex Example

# Set base name for most platforms, with custom names for mobile
fdawg namer set \
  --value "Desktop App" \
  --platforms macos,linux,windows,web \
  --android "Mobile Android" \
  --ios "Mobile iOS"

Platform Configuration Details

The namer command updates the following files for each platform:

Android

File: android/app/src/main/AndroidManifest.xml Property: android:label attribute in <application> tag

<application
    android:label="My Flutter App"
    android:icon="@mipmap/ic_launcher">

iOS

File: ios/Runner/Info.plist Properties: CFBundleDisplayName and CFBundleName

<key>CFBundleDisplayName</key>
<string>My Flutter App</string>
<key>CFBundleName</key>
<string>My Flutter App</string>

macOS

File: macos/Runner/Configs/AppInfo.xcconfig Property: PRODUCT_NAME configuration variable

PRODUCT_NAME = My Flutter App

Linux

File: linux/CMakeLists.txt Property: BINARY_NAME variable

set(BINARY_NAME "my_flutter_app")

Windows

File: windows/CMakeLists.txt Properties: project() name and BINARY_NAME variable

project(my_flutter_app LANGUAGES CXX)
set(BINARY_NAME "my_flutter_app")

Web

Files: web/manifest.json and web/index.html

manifest.json:

{
  "name": "My Flutter App",
  "short_name": "My Flutter App"
}

index.html:

<title>My Flutter App</title>
<meta name="apple-mobile-web-app-title" content="My Flutter App">

Safety Features

The namer command includes comprehensive safety features:

1. Automatic Backups

Before making any changes, FDAWG creates backups of all files that will be modified:

.fdawg_backups/
β”œβ”€β”€ namer_backup_20231201_143022/
β”‚   β”œβ”€β”€ android_app_src_main_AndroidManifest.xml
β”‚   β”œβ”€β”€ ios_Runner_Info.plist
β”‚   β”œβ”€β”€ macos_Runner_Configs_AppInfo.xcconfig
β”‚   β”œβ”€β”€ linux_CMakeLists.txt
β”‚   β”œβ”€β”€ windows_CMakeLists.txt
β”‚   β”œβ”€β”€ web_manifest.json
β”‚   └── web_index.html

2. Automatic Rollback

If any error occurs during the naming process, FDAWG automatically restores all files from the backup:

Error updating iOS configuration
Rolling back all changes...
βœ“ Restored android/app/src/main/AndroidManifest.xml
βœ“ Restored ios/Runner/Info.plist
All changes have been rolled back successfully.

3. Platform Validation

FDAWG only attempts to update platforms that exist in your project:

Checking available platforms...
βœ“ Android platform found
βœ“ iOS platform found
βœ— macOS platform not found (skipping)
βœ“ Web platform found

Updating 3 platforms...

4. Flutter Project Validation

Ensures you’re running the command in a valid Flutter project before making any changes.

Best Practices

1. Consistent Naming Strategy

# For consumer apps - use friendly names
fdawg namer set --value "My Awesome App"

# For enterprise apps - use descriptive names
fdawg namer set --value "Company Mobile Portal"

# For platform-specific branding
fdawg namer set \
  --android "Android App" \
  --ios "iOS App" \
  --web "Web Portal"

2. Naming Conventions by Platform

Mobile Platforms (Android/iOS):

  • Use user-friendly names
  • Keep under 30 characters
  • Avoid special characters

Desktop Platforms (macOS/Linux/Windows):

  • Can use longer, more descriptive names
  • Consider including company name
  • Follow platform conventions

Web Platform:

  • Use SEO-friendly names
  • Consider PWA installation name
  • Keep short for browser tabs

3. Testing Changes

# Check current names before changing
fdawg namer list

# Make changes
fdawg namer set --value "New App Name"

# Verify changes
fdawg namer list

# Test app launch on each platform
flutter run -d android
flutter run -d ios
flutter run -d web

Common Workflows

Setting up app names for a new project

# Check what platforms are available
fdawg namer list

# Set universal name
fdawg namer set --value "My New Flutter App"

# Verify changes
fdawg namer list

Rebranding an existing app

# Backup current state (automatic, but good to check)
fdawg namer list

# Update to new brand name
fdawg namer set --value "New Brand Name"

# Test on all platforms
flutter clean
flutter pub get
# Test builds for each platform

Platform-specific naming for different markets

# Different names for different regions/platforms
fdawg namer set \
  --android "Mobile App - Android" \
  --ios "Mobile App - iOS" \
  --web "Web Portal" \
  --windows "Desktop Application"

Preparing for app store releases

# Set production names
fdawg namer set --value "Production App Name"

# Verify all platforms before release
fdawg namer list

# Build release versions
flutter build apk --release
flutter build ios --release
flutter build web --release

Troubleshooting

Common Issues

Issue: β€œPlatform not found” warnings

  • Solution: Normal if your project doesn’t support all platforms. FDAWG skips missing platforms automatically.

Issue: Permission denied errors

  • Solution: Ensure you have write permissions to the project directory and platform-specific folders.

Issue: Changes not reflected in app

  • Solution: Run flutter clean and flutter pub get after changing app names, then rebuild.

Issue: Backup restoration needed

  • Solution: If something goes wrong, backups are in .fdawg_backups/ directory. You can manually restore files if needed.

Manual Backup Restoration

If automatic rollback fails, you can manually restore from backups:

# Find the latest backup
ls -la .fdawg_backups/

# Restore specific files manually
cp .fdawg_backups/namer_backup_*/android_app_src_main_AndroidManifest.xml android/app/src/main/AndroidManifest.xml

Integration with Web Interface

The FDAWG web interface provides visual app naming:

  • Real-time preview of names across platforms
  • Platform availability detection
  • Visual feedback for changes
  • Backup and rollback management

Access via: fdawg serve β†’ App Namer tab

Advanced Usage

Scripting and Automation

# Use in CI/CD pipelines
fdawg namer set --value "$APP_NAME_ENV_VAR"

# Conditional naming based on environment
if [ "$ENVIRONMENT" = "production" ]; then
  fdawg namer set --value "Production App"
else
  fdawg namer set --value "Development App"
fi

Batch Operations

# Set different names for development vs production
fdawg namer set --value "Dev App" --platforms android,ios
fdawg namer set --value "Development Portal" --platforms web,windows,macos

Next: Learn about Server Commands for web interface and project validation.