change_package_name

v1.3.0

A Flutter tool for easily changing package names, bundle identifiers, and app names across Android, iOS, and other platforms.

8,760
Downloads
84
Likes
88%
Popularity
NOCORPS
Author
toolspackagerenameandroidios
# Change Package Name

A powerful Flutter tool that makes changing your app's package name, bundle identifier, and display name across all platforms quick and error-free.

## Features

🚀 **Cross-Platform** - Works with Android, iOS, macOS, Linux, and Windows
🔒 **Safe Changes** - Automatic backups and validation
📱 **Complete Coverage** - Updates all necessary files and configurations
âš¡ **Fast & Easy** - One command to change everything
🔄 **Rollback Support** - Easily undo changes if needed

## Installation

Add this to your `pubspec.yaml`:

```yaml
dev_dependencies:
  change_package_name: ^1.3.0
```

Then run:

```bash
flutter pub get
```

## Usage

### Command Line Interface

```bash
flutter pub run change_package_name:main com.newcompany.newapp
```

### Interactive Mode

```bash
flutter pub run change_package_name:main --interactive
```

### With Custom App Name

```bash
flutter pub run change_package_name:main com.newcompany.newapp "My New App"
```

## What Gets Changed

### Android
- `android/app/build.gradle`
- `android/app/src/main/AndroidManifest.xml`
- `android/app/src/debug/AndroidManifest.xml`
- `android/app/src/profile/AndroidManifest.xml`
- Package directories and Kotlin/Java files

### iOS
- `ios/Runner.xcodeproj/project.pbxproj`
- `ios/Runner/Info.plist`
- Bundle identifier configurations

### Other Platforms
- macOS bundle identifiers
- Linux desktop files
- Windows package configurations

## Advanced Usage

### Programmatic Usage

```dart
import 'package:change_package_name/change_package_name.dart';

void main() async {
  final changer = PackageNameChanger();
  
  await changer.changePackageName(
    newPackageName: 'com.example.newapp',
    appName: 'New App Name',
    createBackup: true,
  );
}
```

### Validation

The tool automatically validates:
- Package name format (must be valid Java package name)
- Bundle identifier format for iOS
- Special character handling
- Reserved keywords

## Backup and Recovery

### Automatic Backups

Backups are created automatically in `backup/` directory with timestamp.

### Manual Rollback

```bash
flutter pub run change_package_name:main --rollback backup_20250115_143022
```

## Troubleshooting

### Common Issues

1. **Permission Denied**: Run with administrator/sudo privileges
2. **Invalid Package Name**: Ensure format is like `com.company.app`
3. **Backup Failed**: Check disk space and write permissions

### Getting Help

- Check our [FAQ](https://github.com/nocorps/change_package_name/wiki/FAQ)
- [Report Issues](https://github.com/nocorps/change_package_name/issues)
- [Discussion Forum](https://github.com/nocorps/change_package_name/discussions)

## Contributing

Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md).

## License

MIT License - see [LICENSE](LICENSE) file for details.

Installation

Add this package to your pubspec.yaml file:

# pubspec.yaml
dependencies:
change_package_name: ^1.3.0

Then run flutter pub get to install the package.