LoginSignup
2
1

More than 3 years have passed since last update.

Swiftの実機テストする際に出たエラーの解決法

Posted at

はじめに

いつもはSimulatorを使ってテストをしているのですが、自分のiPhoneでも試してみたいと思い、実機テストをやってみました。思っていたより梃子摺ったので遭遇したエラーの解決方法をまとめてみました。

「Signing for "アプリ名" requires a development team.」というエラーが出た場合

Signing & CapabilitiesでTeamを設定する。Apple IDでログインするとTeamという項目で自分のアカウントを選択できるようになるのでそこから設定する。
スクリーンショット 2020-08-01 20.39.24.png

「Could not locate device support files.」というエラーが出た場合

https://github.com/filsv/iPhoneOSDeviceSupport
こちらのサイトから自分のiPhoneのiOSにあったファイルをダウンロードする。
Finderでcommand + shift + gを押すと、パスを指定して移動できるので、下のパスをコピペする。

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/

開いたフォルダに先程Githubからダウンロードしたフォルダを移動させて、Xcodeを再起動する。
(もし13.5.1のようにバージョンが細かい場合は、Githubからダウンロードした13.5のファイル名を13.5.1のように変更すれば良い。)

「Untrusted Developer」というエラーが出た場合

iPhoneで設定→General→Profile & Device Managementに移動すると、Developer Appという項目があるので、そこにある自分のアプリ名をクリックし、「<アプリ名>を信頼する」で「信頼」というボタンを押せば、自分のiPhoneで自作したアプリにアクセスできるようになります。

参考にしたサイト
https://qiita.com/solabito331/items/17ee51d954fb3f87b37c
https://cpoint-lab.co.jp/article/201906/10350/
https://qiita.com/segur/items/bef54efa7764885173bb

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