fluttrify 1.0.2 copy "fluttrify: ^1.0.2" to clipboard
fluttrify: ^1.0.2 copied to clipboard

A CLI tool to easily rename Flutter project package names for Android and iOS.

Fluttrify #

A simple CLI tool to easily rename Flutter project package names for Android and iOS.

Fluttrify

Dart

License## Overview

Fluttrify simplifies the process of changing package names in Flutter projects. When you need to rename your app's package identifier (e.g., from com.example.app to com.yourcompany.app), Fluttrify automates the tedious process of updating all the necessary files in both Android and iOS platforms.

Features #

  • ✅ Rename Android package names in:
    • AndroidManifest.xml files (main, debug, profile)
    • build.gradle
    • MainActivity.java/kt
  • ✅ Rename iOS bundle identifiers in:
    • Info.plist
  • ✅ Support for both platforms or individual platform updates
  • ✅ Automatic file structure reorganization for Android
  • 🚀 Fancy progress animation

Installation #

# Install globally
dart pub global activate fluttrify

Make sure your Dart SDK's bin directory is in your system's PATH environment variable.

From Source #

# Clone the repository
git clone https://github.com/aliarain/fluttrify.git

# Navigate to the project directory
cd fluttrify

# Get dependencies
dart pub get

# Activate the package globally
dart pub global activate --source path .

Usage #

Navigate to your Flutter project's root directory and run:

fluttrify com.company.hello

Options #

-h, --help           Show usage information
-p, --platform       Platform to rename: android, ios, or both (default: both)

Examples #

# Rename package for both platforms
fluttrify com.company.hello

# Rename package for Android only
fluttrify com.company.hello --platform=android

# Rename package for iOS only
fluttrify com.company.hello -p ios

For a more detailed example with visual representation of the changes, check out the example directory.

How It Works #

Fluttrify performs the following operations:

  1. For Android:

    • Updates the package attribute in all AndroidManifest.xml files
    • Updates applicationId in build.gradle
    • Updates package declaration in MainActivity.java/kt
    • Moves MainActivity to the correct directory structure based on the new package name
  2. For iOS:

    • Updates CFBundleIdentifier in Info.plist

Requirements #

  • Dart SDK 3.6.0 or higher
  • A Flutter project with standard directory structure

Limitations #

  • The tool assumes a standard Flutter project structure
  • For iOS, if the CFBundleIdentifier uses variables (e.g., $(PRODUCT_BUNDLE_IDENTIFIER)), manual update is required
  • The tool doesn't update references to the package name in your Dart code

Contributing #

Contributions are welcome! Please feel free to submit a Pull Request.

License #

This project is licensed under the MIT License - see the LICENSE file for details.

Author #

Built by aliarain

0
likes
145
points
21
downloads

Publisher

unverified uploader

Weekly Downloads

A CLI tool to easily rename Flutter project package names for Android and iOS.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

args, path, xml

More

Packages that depend on fluttrify