ふくしま

ソフトウェアエンジニア

FlutterでiPhone実機ビルドした時に署名の設定をした話

問題

実機を繋げてその実機の id を指定して flutter run したところ、エラーが出てビルドできない。 以下のような文言が出る。どうやら署名のところでうまく行っていないようだ。

Could not build the precompiled application for the device.

It appears that your application still contains the default signing identifier.
Try replacing 'com.example' with your signing id in Xcode:
  open ios/Runner.xcworkspace

解決策

指示の通り、 open ios/Runner.xcworkspace Xcodeを開き、三角ボタンでビルドしてみる。 すると、いくつかエラーが出るので、それを直す。 自分の場合は以下を直した。

  • TARGETSのRunner→Signing&Capabilitiesで実機が登録されていなかったため登録
  • Pods→gRPC-C++でteamを選択できていなかったため選択

参考