25

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
kroko
  • 299
  • 3
  • 10
  • Not sure if this is relevant to you or not, but, this "seems" to be an issue with 10.1 ... and yes, once you have it installed, there's nothing you seem to be able to do to fix it ☹️ See [this issue](https://github.com/Carthage/Carthage/issues/2602) for more details – MadProgrammer Oct 05 '18 at 04:35
  • I installed Xcode10.0 through App Store, but the issue remains the same. – kroko Oct 05 '18 at 08:04
  • I'm getting this, too, on Xcode 9.4.1 with Carthage v 0.31.0. Xcode-select does show Xcode 9's build tools selected. Any Carthage command which invokes a build shows this for me, not just `bootstrap.` – u2Fan Oct 05 '18 at 17:49
  • I've been having this issue, an upgrade to v0.31.1 solved it. – jameshartt Oct 15 '18 at 14:53
  • 1
    Issue happens for me with latest Carthage (0.34) – BadmintonCat Jan 27 '20 at 05:53

8 Answers8

26

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

brew uninstall carthage --force
brew install carthage
Tomáš Linhart
  • 13,509
  • 5
  • 51
  • 54
  • 2
    Just upgrade carthage. `brew upgrade carthage` – Alex Zavatone Apr 12 '19 at 19:14
  • @AlexZavatone That works if there is a new version. Otherwise, you need to do the trick I mention. – Tomáš Linhart Apr 16 '19 at 10:22
  • Tomas, the reason that this happened was because there *was* a new version that changed the format of the data. – Alex Zavatone Apr 16 '19 at 16:11
  • Alex, then you probably faced a different issue, because upgrade didn't work. – Tomáš Linhart Apr 17 '19 at 12:19
  • Interesting. It's actually the exact issue that I faced. Hmmm. I wonder what didn't work, Tomáš. So much to keep track of under the hood. Now, if an install *did* work we would have expected an up*grade* (not update) to also work as it should have installed the same thing. Argh. Do you remember the version that was installed when you did reinstall it? – Alex Zavatone Apr 17 '19 at 18:49
  • The problem was I had the latest version, so upgrade did nothing. There was no new version to be installed. I don't remember the version anymore, but I think it was v0.31.1? – Tomáš Linhart Apr 17 '19 at 23:38
  • I dont usually like that kind of sultions... But worked for me ^^' – Que20 Jun 04 '19 at 15:52
15

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

brew update && brew upgrade carthage
SoftDesigner
  • 5,640
  • 3
  • 58
  • 47
3

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

lamine
  • 31
  • 3
3

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.

Jon Reid
  • 20,545
  • 2
  • 64
  • 95
3

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

Alex Zavatone
  • 4,106
  • 36
  • 54
2

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.

Tung Tran
  • 439
  • 6
  • 8
0

Uninstalling and installing Carthage trick worked for me!

brew uninstall carthage —force

Screenshot

brew install carthage
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177
0

In my case it was solved.

  1. Close xcode
  2. rm -rf ~/Library/Developer/CoreSimulator/Devices/
  3. Open xcode
  4. Create new project
  5. Run empty project on any simulator
  6. execute carthage update
Carlos Chaguendo
  • 2,895
  • 19
  • 24
  • Except, Xcode does not automatically install any simulators and you're left with a broken sim install after following your steps. – BadmintonCat Jan 27 '20 at 06:34