LoginSignup
27
9

More than 3 years have passed since last update.

Xcode10.2でcarthage updateすると `Could not find any available simulators for iOS`

Last updated at Posted at 2019-03-27

Xcode10.2にあげてSwift5でビルドしようとすると
Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.0 compiler: /Users/......
といったメッセージが表示されました。

もちろんSwift4.2でコンパイルしていたものをSwift5でインポートできないので
carthage update でビルドし直します。
ただ carthage update をしたところ
Could not find any available simulators for iOS というエラーが

carthageがSwift5に対応していないんなじゃないかなと思って
brew upgrade carthage を実行してver0.31から0.32へアップデート

その後 carthage update で無事にビルドできました。

これでもまだ

Could not find any available simulators for iOS

のメッセージが表示されることがあります。その場合は文字通りiOSのシミュレータを削除していることが原因です。
Xcodeからシミュレータを追加しましょう。

  1. Xcodeを開いて左上のGeneric iOS Dvice(端末名)をクリック
  2. Add Additional Simulatorsをクリック
  3. シミュレータの一覧が表示されます(おそらくシミュレータがないので空)
  4. 左下の+ボタンから適当にシミュレータを追加します。

これでビルドできるはずです。シミュレータは意図的に消さないと消えませんが、Xcodeがストレージをたくさん使っているため、不要なデータ削除をしていた際に自分は消してしまっていました。

27
9
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
27
9