1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

XCode|Errors were encountered while preparing your device for development. Please check the Device and Simulators Window.

Posted at

エラーメッセージ

Errors were encountered while preparing your device for development. Please check the Device and Simulators Window.

Google翻訳

デバイスの開発準備中にエラーが発生しました。 [デバイスとシミュレータ] ウィンドウを確認してください。

参考にさせていただきました。
Errors were encountered while preparing your device for development というXcodeエラー

事象

Xcodeで実機ビルドを行なった時、ビルド自体は、Successedになるのですが、実機やシミュレーターで実行する際に以下のエラーが出る。

環境

Xcode: 12.5.1
iPhone 8
iOS: 14.7.1

検証

・ビルドをし直す x
・クリーンビルドをし直す x
・実機端末の接続を繋ぎ直す x 
・実機やシミュレーターを再起動する ◯

操作・コマンド

まずは「Devices and Simulators」ウィンドウを見てみましょう

Window > Devices and Simulators もしくは ⌘⇧2 で開くことができます。

Deviceのところに対象のiPhoneがしっかり表示されていました。

ここにエラーやら何やらが出てたりします。

Xcode error: Failed to prepare device for development

こちらを参考に、実機端末を再起動すると実機ビルドに成功できました

おそらく、いろんなアプリ起動していたり、容量が足りなかったりという原因があり端末側の不具合を起こしている時に出るエラーのようです。

なので、iPhoneの接続を繋ぎ直すだけでなく再起動(リセット)をすることで解決することが多いです。

ちなみに容量が足りなかったりすると他にも様々なエラーが起きたりするので、ある程度の容量を確保して開発してみてください。

開発していたらよくありがちではあるので、繋ぎ直してもダメだ。再起動してもダメだとなった場合に補足でお伝えしておきます。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?