flutter_application_id 0.0.6

  • Readme
  • Changelog
  • Installing
  • 68

Flutter App Id #

A command-line tool which simplifies the task of updating your Flutter app's ID (iOS BundleID and Android applicationId).

:book: Guide #

1. Setup the config file #

Add your Flutter App Id configuration to your pubspec.yaml or create a new config file. An example is shown below.

dev_dependencies: 
  flutter_application_id: "^0.0.1"
  
flutter_application_id:
  android: "com.example.myAndroidApp" 
  ios: "com.example.myIosApp" 

If you name your configuration file something other than pubspec.yaml you will need to specify the name of the file when running the package.

flutter pub get
flutter pub run flutter_application_id:main -f <your config file name here>

2. Run the package #

After setting up the configuration, all that is left to do is run the package.

flutter pub get
flutter pub run flutter_application_id:main

In the above configuration, the package is setup to replace the existing application id in both the Android and iOS project.

🔍 Attributes #

Shown below is the full list of attributes which you can specify within your Flutter Launcher Icons configuration.

  • android/ios
    • absent: Ignore updateing application id for this platform
    • com.example.applicationId: This will update the application id for the platform with the name you specify.

Special thanks #

  • Thanks to Mark O'Sullivan and all the contributors to the project flutter_launcher_icon which I used as a base.

0.0.1 #

  • Initial version

0.0.2 #

  • Updating meta data to increase scoring :)

0.0.3 #

  • Fixed Readme
  • Better sources formatting

0.0.4 #

  • Actually updates project conf files :)

0.0.5 #

  • Updates Pbxproj instead of Plist.

0.0.6 #

  • Updates Application name if requested

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_application_id: ^0.0.6

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_application_id/configuration.dart';
import 'package:flutter_application_id/constants.dart';
import 'package:flutter_application_id/custom_exceptions.dart';
import 'package:flutter_application_id/file_updater/file_updater.dart';
import 'package:flutter_application_id/file_updater/rules/gradle.dart';
import 'package:flutter_application_id/file_updater/rules/pbxproj.dart';
import 'package:flutter_application_id/file_updater/rules/plist.dart';
import 'package:flutter_application_id/file_updater/rules/xml.dart';
import 'package:flutter_application_id/main.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
43
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

We analyzed this package on Jan 19, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.0
  • pana: 0.13.4

Health issues and suggestions

Document public APIs. (-0.20 points)

71 out of 73 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/configuration.dart.

Run flutter format to format lib/configuration.dart.

Format lib/custom_exceptions.dart.

Run flutter format to format lib/custom_exceptions.dart.

Format lib/file_updater/rules/plist.dart.

Run flutter format to format lib/file_updater/rules/plist.dart.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and flutter_application_id.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
args ^1.5.0 1.5.2
equatable ^1.0.1 1.0.2
yaml ^2.1.15 2.2.0
Transitive dependencies
charcode 1.1.2
collection 1.14.12
meta 1.1.8
path 1.6.4
source_span 1.6.0
string_scanner 1.0.5
term_glyph 1.1.0
Dev dependencies
flutter_test
matcher ^0.12.5