Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 10 Could not find any available simulators for iOS when install Carthage dependencies

I'm trying to install Carthage dependencies in my Xcode project with the

Carthage bootstrap --platform iOS 

command line but It's fail and I have this message in my terminal:

Could not find any available simulators for iOS

I've just updated Xcode with the 10 version then the simulators are already installed.

I've also tried to delete each one and reinstall only one with iOS 12.

I have still the same error.

like image 760
kroko Avatar asked Oct 04 '18 15:10

kroko


People also ask

What is Carthage in iOS?

Carthage is a simple dependency manager for macOS and iOS, created by a group of developers from GitHub. Not only was Carthage the first dependency manager to work with Swift, but it's also written in Swift! It exclusively uses dynamic frameworks, rather than static libraries.


6 Answers

What worked for me was uninstalling Carthage and installing it again.

brew uninstall carthage --force brew install carthage 
like image 75
Tomáš Linhart Avatar answered Sep 21 '22 19:09

Tomáš Linhart


Upgrading to v0.31.1 or v0.31.2 fixes it:

brew update && brew upgrade carthage 
like image 42
SoftDesigner Avatar answered Sep 19 '22 19:09

SoftDesigner


After installing Xcode 10.1, I had trouble even with Carthage 0.31.2. But I also have a habit of deleting all simulators when installing Xcode major versions. Adding a simulator for iOS 12.1 fixed things.

like image 32
Jon Reid Avatar answered Sep 19 '22 19:09

Jon Reid


When a new xcode version comes out, it tends to happen. You can try to update Carthage with brew upgrade carthage if installed with Brew

like image 28
lamine Avatar answered Sep 22 '22 19:09

lamine


Just upgrade your Carthage.

As indicated in other answers the cause behind this is that a key indicating simulator model availability changed in a recent update to Xcode 10.x. It was

"availability" : "(available)",

and it is now

"isAvailable" : true,

Upgrading Carthage to 0.33.0 fixes this.

Using brew, enter the following to update Carthage

brew upgrade carthage

Notice the word is upgrade, not update.

Check the version of carthage

brew list --versions carthage

carthage 0.33.0

And in the terminal at the root of your project, enter this to rebuild your Carthage dependancies.

carthage bootstrap --platform iOS

They all should build as expected.

You can check the data format of the available simulators through this command.

xcrun simctl list devices --json

like image 40
Alex Zavatone Avatar answered Sep 20 '22 19:09

Alex Zavatone


try to run

sudo brew install --HEAD carthage

Since Xcode 10.1 beta, Structures of xcrun simctl list devices --json is changed.

Before

{
  "devices" : {
    "iOS 12.0" : [
      {
        "state" : "Shutdown",
        "availability" : "(available)",
        "name" : "iPhone 5s",
        "udid" : "A52BF797-F6F8-47F1-B559-68B66B553B23"
      }
  ]
}

After

{
  "devices" : {
    "iOS 12.0" : [
      {
        "state" : "Shutdown",
        "isAvailable" : "YES",
        "name" : "iPhone 5s",
        "udid" : "A52BF797-F6F8-47F1-B559-68B66B553B23"
      }
  ]
}

Because of this changes, parsing on Xcode 10.1 is failed.

like image 29
Tung Tran Avatar answered Sep 20 '22 19:09

Tung Tran