Unable to boot device because it cannot be located on disk

Xcodeでシミュレーターを使ってアプリを実行した時に下記エラーダイアログが表示され、アプリが実行できないことが稀にあります。

メッセージ

/images/uploads/20201008050528.png

Unable to boot device because it cannot be located on disk

Use the devide manager in Xcode or the simctl command line tool to either delete the device properly or erase contents and settings

これは何らかの操作によってシミュレーターのデバイス情報が削除されてしまってシミュレーター自体が実行できなかった時に出力されるメッセージです。

解決手順

一回シミュレーターの情報を削除しリセットすることでエラーが解決します。

ターミナルを開く

xcrunというコマンドでxcodeのツールを使用します。

以下のようにコマンドを実行

実行すれば数秒で処理は完了します。

/images/uploads/20201008050959.png

xcrun simctl erase all

Xcodeよりアプリを実行

エラーは解決されシミュレーターが起動しアプリが実行できるようになります。


Category