事象
Flutter製のiOSアプリをリリースする前に実行すべきコマンドflutter build ios
を実行したところ、Code Signing Error: No profiles for '<BundleID>' were found: Xcode couldn't find any iOS App Development provisioning profiles matching '<BundleID>'.
と表示されてコマンド実行に失敗しました。
原因
このエラー文言の続きを読んでみると、Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
と記載されています。
どうやらXCodeの自動署名機能?は無効化されるようです。
対処
XCodeでプロジェクトを開いてSigningの項目を確認してみると、Automatically manage signing
の設定にチェックが付いていました。
これを外して下記の通り作業した結果、無事flutter build ios
の実行が成功しました。
-
Automatically manage signing
のチェックを外す。 -
flutter clean
を実行する。 -
flutter build ios
を実行する。