LoginSignup
1
2

More than 3 years have passed since last update.

flutter createでうっかり--orgオプションをつけ忘れたときにやること

Last updated at Posted at 2020-11-23

モチベーション

  • flutter create hogeと何も考えずに打ち、Bundle IDがcom.example.hogeになってしまうのを何度もやらかした
  • これを直すのが結構めんどうだった(特にAndorid)
  • これがいちばん早いと思います

iOS

  • Xcodeを起動
  • プロジェクト設定のGeneral -> Bundle Identifierを書き換えれば終わり

Andorid

  • Flutteプロジェクトのルートディレクトリにて、ターミナルからflutter create --org com.nicedomain .と打つと足りないファイルを追加してくれる。
  • Android StudioのReplace in Path(⌘⇧R)を使い、全てのファイルのcom.example.hogecom.nicedomein.hogeに置換する。

  • android/app/src/main/kotlin/com.example/をディレクトリごと削除する

おまけ

  • FirebaseのGoogleService-Info.plist(iOS用)とかgoogle-services.json(Andorid用)は、Bundle IDに紐付いているので、Firebaseアプリを新しいBundle IDで作り直して、もう一度ダウンロードしてくる必要がある。
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2