infoMore 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.hoge
をcom.nicedomein.hoge
に置換する。
-
android/app/src/main/kotlin/com.example/
をディレクトリごと削除する
おまけ
- Firebaseの
GoogleService-Info.plist
(iOS用)とかgoogle-services.json
(Andorid用)は、Bundle IDに紐付いているので、Firebaseアプリを新しいBundle IDで作り直して、もう一度ダウンロードしてくる必要がある。
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
What you can do with signing up