LoginSignup
2
2

More than 1 year has passed since last update.

iOSの実機でビルド実行するとProvisioning profileが証明書に含まれていないとのエラーが出る場合の解決方法

Posted at

こんにちは。もぐめっとです。

本日の投稿は問題解決tips系の投稿です。

結論

iOS実機をビルドしてデバッグしようとするとprovisioning profileがうまくあたらなくてビルドできないので、端末の証明書を再発行するとうまくいく

エラー内容

最近Flutterをやっているのですが、別端末でiosを実行しようとすると下記のようなエラーがでました。

  error: Provisioning profile "iOS Team Provisioning Profile: com.mogmet" doesn't include signing certificate "Apple Development: Mog Met (XXXXXXXX)". (in target 'Runner' from project 'Runner')

ちゃんとAutomatically manage signingにチェックが入って組織も問題なさそうなのにこのエラーが出ました。

image.png

原因としては証明書をfastlane matchで管理しているのですが、match nukeとかで他の証明書などの環境を掃討したのでこの現象に陥ったっぽいです。

解決方法

解決方法は至って簡単です。
端末の証明書を再発行するだけです。

preferencesを開き、

image.png

対象の組織を選んで、「Manage Certificates」を選択します。

image.png

左下の+ボタンから「Apple Development」を選択します。
image.png

その後再度ビルドすると実機で実行できるようになります。

まとめ

match nukeを実行した後は端末側の証明書も再発行してあげましょう。

2
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
2
2