Carthage update failure saying "Could not find any available simulators for iOS" - Xcode 10.1, macOS Mojave (10.14.2)

Perhaps some checks you can make to narrow it down a little bit:

Carthage version

carthage version

should output

0.31.2

Multiple Xcode installed

xcode-select -p

should give

/Applications/Xcode.app/Contents/Developer

for a standard installation.

Simulator

xcrun simctl list devices --json 

That should output a list like:

{
  "devices" : {
    "iOS 12.1" : [
      {
        "availability" : "(available)",
        "state" : "Shutdown",
        "isAvailable" : true,
        "name" : "iPhone 5s",
        "udid" : "1A6959A0-C10F-474B-96C5-7E8955FBDD80",
        "availabilityError" : ""
      },
  ...

If there are no simulators add one using Xcode <Window/Devices and Simulators>.

If there are entries please check if there is a 'isAvailable' entry with true as value:

"isAvailable" : true,

If not, check Xcode installation.

Remove Caches

One could als try to

  • quit Xcode
  • remove caches for Carthage and Xcode derived data folder

As always when using rm -rf you have to be careful:

rm -rf ~/Library/Caches/org.carthage.CarthageKit 
rm -rf <your project folder>/Carthage
xcrun simctl delete unavailable

Then try again:

carthage update --no-use-binaries --platform iOS

Debug Carthage

The nice thing about Carthage is that it is open source and even written in Swift.

So to debug it we can:

  • quit Xcode
  • create a folder in Terminal and cd to the folder

Then:

git clone https://github.com/Carthage/Carthage.git
cd Carthage
git checkout 0.31.2
make bootstrap
open Carthage.xcworkspace

Afterwards we need to enter command line arguments. To do so:

  • in Xcode use <Product/Scheme/Edit Scheme...>
  • on the left choose 'Run/Debug'
  • on the right choose tab 'Arguments'
  • change the 'Arguments Passed on Launch' to update --no-use-binaries --platform iOS

Arguments

  • switch to the tab 'Options'
  • enter as `Working Directory' the path where the Cartfile resides

Workding Directory

Finally:

  • open Carthage/Source/CarthageKit/Simulator.swift
  • set breakpoints in the method selectAvailableSimulator

Then you can debug what's going wrong.

If everything is fine it would look like this:

Debug Session

If no error occurred when run from Xcode then let it run in Xcode completely without breakpoint and giving it some time to do the compile.

If carthage update is successful from Xcode project then uninstall your current carthage installation as described here.

How to uninstall Carthage from OS X?

Then in Terminal go to the Carthage project folder where the Makefile resides and type:

'make install'

Afterwards you can try it from the command line again. It should work!


I solved this same problem upgrading Carthage to version 0.32.0 with:

brew upgrade carthage

PS: Problem occurred after updating Xcode to version 10.2


I solved this same problem upgrading Carthage 0.31.2 to 0.33.0 with:

brew upgrade carthage

PS: Problem occurred after updating Xcode to version 10.2