iOS Simulator が起動できない時の切り分けと復旧手順
開発環境
iOS
トラブルシューティング
open -a Simulator で「Unable to boot the Simulator」が出る場合、Simulator 本体ではなく CoreSimulatorService 側が落ちていることが多い。xcrun simctl list でデバイス一覧すら取れず CoreSimulatorService connection became invalid / Connection refused が出ていれば確定。
復旧手順(軽い順):
- Simulator と Xcode を完全終了し、
killall Simulatorkillall com.apple.CoreSimulator.CoreSimulatorServiceしてから再度open -a Simulator - デバイス情報リセット:
xcrun simctl shutdown allxcrun simctl erase all - キャッシュ破損対応:
rm -rf ~/Library/Developer/CoreSimulator/Cachesrm -rf ~/Library/Logs/CoreSimulatorしてサービス再起動 - それでもダメなら Xcode 側のランタイム不整合を疑う(Settings>Platforms に iOS Simulator runtime があるか、
xcode-select -pが Xcode.app を向いているか、macOS 再起動)