Some users of SwiftMongoDB have been reporting the error:
*** Building scheme "bson-ios" in bson.xcodeproj
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, id:4F161478-B33A-4C02-BAFD-5E7B284D5FD9 }
A shell task failed with exit code 70
Unfortunately I'm not able to reproduce this, but several people have reported this issue here, and then said that the error was gone when they built from source (without using Carthage).
For now the solution is to use the --no-build flag and add the Xcode project as a subproject, but it might be inconvenient for some people.
Thanks.
This might be an issue with "unavailable" simulators. Running xcrun simctl list might turn up some simulators that are unavailable and need to be deleted.
I had somebody run that for me on their machine a few days back, but I didn't know what to look for. Maybe you could take a look? What worries me is that multiple people have this issue (but not me), and I think telling them to delete simulators could be discouraging.
Hmm… that doesn't look to be the cause in this case, since the reported identifier isn't an unavailable simulator. :confused:
Yeah, that confused me (which is why I'm here). FWIW, I don't have a simulator with that id either.
I just had this and traced it to the fact that the project that I was trying to build was from a newer version of Xcode than that specified with xcode-select (-p), and hence the specified simulator was not available from command line etc. Every case could be different, just my anecdotal experience.
I just had this with Xcode 7.1 (7B91b). Updating to Xcode 7.2 (7C68) fixed the problem.
People reported that this issue persisted with Xcode 7.2 Beta (latest one at the time).
@viotti What version of Xcode was your affected project built with? When trying to setup Carthage locally, I had missed the fact that my project was created with 7.2B4, but my command line was still using Xcode 7.1.1, so the default device target for ios 9.2 was not available from the command line, causing the error.
Clearly can _simulate_ this bug by selecting an older version with xcode-select, but that might not be the most general cause.
@chrisco314 I'm new to Xcode so I really don't know. :stuck_out_tongue_winking_eye: If you give me specific instructions where to look at I could try to get this information for you.
I was trying to run https://github.com/Danappelxx/MongoDBExplorer on Xcode. I installed Carthage with Homebrew, then cloned the MongoDBExplorer Git repo, then ran carthage bootstrap.
brew update
brew install carthage
git clone [email protected]:Danappelxx/MongoDBExplorer.git
cd MongoDBExplorer
carthage bootstrap
Then I got the error.
(… snip …)
*** Building scheme "BondOSX" in Bond.xcodeproj
*** Building scheme "BondtvOS" in Bond.xcodeproj
*** Building scheme "Bond" in Bond.xcodeproj
*** Building scheme "RATreeView" in RATreeView.xcodeproj
*** Building scheme "RATreeView-iOS" in RATreeView.xcodeproj
*** Building scheme "SnapKit OSX" in SnapKit.xcworkspace
*** Building scheme "SnapKit iOS" in SnapKit.xcworkspace
*** Building scheme "bson-osx" in bson.xcodeproj
*** Building scheme "bson-ios" in bson.xcodeproj
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:iOS Simulator, id:D666B367-0544-401E-9E9A-8F5CE464DAB2 }
A shell task failed with exit code 70
After reading your comment I found out I had Xcode 7.1 installed, and decided to update it. Ran carthage bootstrap again, this time with success.
Huh - thats interesting. I suppose this could now be closed if the only issue is Xcode being out of date.
Running into the same issue with Xcode 7.2 (also selected);
*** Building scheme "OMGOSX" in OMGHTTPURLRQ.xcodeproj
*** Building scheme "OMGwatchOS" in OMGHTTPURLRQ.xcodeproj
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:watchOS Simulator, id:159BC2F0-F5CC-41B1-A674-04832D807AFC }
A shell task failed with exit code 70:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:watchOS Simulator, id:159BC2F0-F5CC-41B1-A674-04832D807AFC }
The identifier refers to some watchOS 2.1 device:
-- watchOS 2.1 --
Apple Watch - 38mm (159BC2F0-F5CC-41B1-A674-04832D807AFC) (Shutdown)
Apple Watch - 42mm (692CC7D5-C397-4740-BDF6-259DDC96409C) (Shutdown)
I'm having the same issue as @Bouke in XCode 7.2 (7C68)
*** Building scheme "OMGOSX" in OMGHTTPURLRQ.xcodeproj
*** Building scheme "OMGwatchOS" in OMGHTTPURLRQ.xcodeproj
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:watchOS Simulator, id:A7A79CF5-288B-4CD5-8EC0-33DB402D802C }
A shell task failed with exit code 70:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:watchOS Simulator, id:A7A79CF5-288B-4CD5-8EC0-33DB402D802C }
~$ xcrun simctl list
== Device Types ==
Apple Watch - 38mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm)
Apple Watch - 42mm (com.apple.CoreSimulator.SimDeviceType.Apple-Watch-42mm)
== Runtimes ==
watchOS 2.0 (2.0 - 13S343) (com.apple.CoreSimulator.SimRuntime.watchOS-2-0)
watchOS 2.1 (2.1 - 13S660) (com.apple.CoreSimulator.SimRuntime.watchOS-2-1)
== Devices ==
-- watchOS 2.0 --
Apple Watch - 38mm (42782048-89B1-4DB4-8AA7-2C5290147E72) (Shutdown)
Apple Watch - 42mm (024D2C28-FF97-41DF-8588-F2E6CF8287CF) (Shutdown)
-- watchOS 2.1 --
Apple Watch - 38mm (A7A79CF5-288B-4CD5-8EC0-33DB402D802C) (Shutdown)
Apple Watch - 38mm (923786AE-7EEC-45C2-ABAA-B0FAB76F11FB) (Shutdown)
Apple Watch - 42mm (4C089C46-65E4-4DF0-A6B7-2045D5D3C78B) (Shutdown)
Same issue with XCode 7.2
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:tvOS Simulator, id:A28D6752-BF88-4FE5-AEDC-EA173477CE11 }
A shell task failed with exit code 70:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:tvOS Simulator, id:A28D6752-BF88-4FE5-AEDC-EA173477CE11 }
~$ xcrun simctl list
-- tvOS 9.1 --
Apple TV 1080p (A28D6752-BF88-4FE5-AEDC-EA173477CE11) (Booted)
EDIT: _found the problem_ for me: being lazy, instead of creating a target for Apple TV from scratch, I duplicated the iOS one, modifying all the parameters. What I didn't notice is that, in that way, no matter how carefully I edited the build settings, there is no way to select any tv simulator for the appletv target, but only a "Generic tvos device", which was the cause of my problem with carthage
I had this issue with a framework that had its deployment target set to 9.3, while building with an Xcode that only supports 9.2 (substitute versions for other platforms as makes sense). Changing it back to 8.0 (which is what we wanted, YMMV) fixed it.
Setting the command line tool version to Xcode 7.2 (7C68) did the trick. Open Xcode 7.2. You can set the command line tool version by following Xcode preferences - > Locations - > Command Line Tools
Same steps as for @payalbaldota helped me too.
I'm having the same problem when running carthage build --no-skip-current --verbose with my library: https://github.com/pusher-community/pusher-websocket-swift
This is the output:
** BUILD SUCCEEDED **
Build settings from command line:
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
ONLY_ACTIVE_ARCH = NO
SDKROOT = appletvsimulator9.1
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:tvOS Simulator, id:3DFE0B58-4A70-4B63-8637-BD3ADFB063C0 }
A shell task failed with exit code 70:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:tvOS Simulator, id:3DFE0B58-4A70-4B63-8637-BD3ADFB063C0 }
However, running xcrun simctl list shows that the tvOS simulator with that id does exist:
== Devices ==
-- iOS 9.2 --
iPhone 4s (54F14860-4685-490F-B17D-B1ADFF6783B5) (Shutdown)
iPhone 5 (69C1E6F5-1FBB-4DDC-B619-061AE43ED5F4) (Shutdown)
....... etc
-- tvOS 9.1 --
Apple TV 1080p (3DFE0B58-4A70-4B63-8637-BD3ADFB063C0) (Shutdown)
....... etc
Note that the build succeeds for iOS and OSX, but always fails for tvOS. Any ideas?
Are you using the latest version of Carthage? Have you tried the previous fixes listed in this thread?
Yep, I'm using:
I completely nuked Xcode and all supporting files (~/Library/Developer, ~/Library/Application Support/Xcode etc etc) and reinstalled it.
Same with Carthage - a complete reinstall from homebrew.
However, the same problem remains:
xcrun simctl list
== Device Types ==
iPhone 4s (com.apple.CoreSimulator.SimDeviceType.iPhone-4s)
iPhone 5 (com.apple.CoreSimulator.SimDeviceType.iPhone-5)
.....
== Devices ==
.....
-- tvOS 9.1 --
Apple TV 1080p (16C0EEC0-26E8-473E-AF0F-B8EFBE04BD3E) (Shutdown)
.....
and the error:
** BUILD SUCCEEDED **
Build settings from command line:
CODE_SIGN_IDENTITY =
CODE_SIGNING_REQUIRED = NO
ONLY_ACTIVE_ARCH = NO
SDKROOT = appletvsimulator9.1
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:tvOS Simulator, id:16C0EEC0-26E8-473E-AF0F-B8EFBE04BD3E }
A shell task failed with exit code 70:
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:tvOS Simulator, id:16C0EEC0-26E8-473E-AF0F-B8EFBE04BD3E }
I've found a solution (for me at least).
I had my TARGETED_DEVICE_FAMILY value set incorrectly for the tvOS target.
The values for TARGETED_DEVICE_FAMILY that I now have, based on the target are as follows, in case it helps anyone else:
3"1,2"4"1,2"I'm using Cocoapods and I presume it's because of that which meant that in the User-Defined section at the bottom of each target's Build Settings there was a value set for TARGETED_DEVICE_FAMILY.
Hope this helps someone else! :+1:
LOL leaky implementation details and magic numbers. A combination made in heaven.
These values are defined in https://github.com/jspahrsummers/xcconfigs so I don't think about it anymore, but I hate to see people waste time due to obscure errors caused by this 😓.
Oh man - I had no idea that existed. That would have saved me a _ridiculous_ amount of time over the last few weeks (would have prevented me from spending hours on this one too: https://github.com/CocoaPods/CocoaPods/issues/4752).
Anyway, thanks!
Stuck into this problem right now when building mxcl/PromiseKit for watchOS and as @hamchapman mentioned before, setting TARGETED_DEVICE_FAMILY=4 manually worked like a charm! Thank you :)
But the real problem is now I GOT TO set TARGETED_DEVICE_FAMILY=4 manually every single time I run carthage update. This is extremely annoying compared to the cocoapods that supports custom build configurations in Podfile. Honestly. Really.
I'm trying to workaround this by making some sort of build script and:
carthage update --platform iOS
carthage update --platform watchOS --no-build
# Do whatever black magic to rewrite .xcodeproj file that doesn't work, I personally prefer using xcodeproj of ruby
carthage build --platform watchOS
but this is really inconvenient :(
I'm still seeing this message periodically when using Carthage with MarkupKit and HTTP-RPC. The strange thing is that it is not consistent. Sometimes the build works fine.
The error occurs on this line:
/usr/bin/xcrun xcodebuild -workspace /Users/greg/work/Test/Carthage/Checkouts/HTTP-RPC/Client/Objective-C/HTTPRPC.xcworkspace -scheme HTTPRPC -configuration Release -derivedDataPath /Users/greg/Library/Caches/org.carthage.CarthageKit/DerivedData/HTTP-RPC/4.1.7 -sdk iphonesimulator -destination platform=iOS\ Simulator,id=FF4ED874-2171-42C6-9150-9B264101D914 -destination-timeout 3 ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build
I found that removing the -destination argument seems to resolve the problem:
/usr/bin/xcrun xcodebuild -workspace /Users/greg/work/Test/Carthage/Checkouts/HTTP-RPC/Client/Objective-C/HTTPRPC.xcworkspace -scheme HTTPRPC -configuration Release -derivedDataPath /Users/greg/Library/Caches/org.carthage.CarthageKit/DerivedData/HTTP-RPC/4.1.7 -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO CODE_SIGNING_REQUIRED=NO CODE_SIGN_IDENTITY= CARTHAGE=YES build
Hope it helps.
First, apologies in advance for "reopening" an old issue.
I'm getting carthage build --archive failing on a framework when archiving for watchOS, apparently because the destination chosen by carthage is not available. This same issue happens when doing carthage update from other projects consuming this framework:
$ carthage build --archive
[...]
This usually indicates that project itself failed to compile. Please check the xcodebuild log for more details: /var/folders/38/v5zmdz1n0ls16d9cw_ybdrww0000gn/T/carthage-xcodebuild.w2ZtKE.log
$ tail -n 20 /var/folders/38/v5zmdz1n0ls16d9cw_ybdrww0000gn/T/carthage-xcodebuild.w2ZtKE.log
[...]
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ platform:watchOS Simulator, id:5CEE5DAF-CB21-4364-9FEC-DD0D72DEC592 }
The requested device could not be found because no available devices matched the request.
[...]
In reply to @mdiep comment above, printing the list of simulators clearly shows the picked one as unavailable:
$ xcrun simctl list | grep 5CEE5DAF-CB21-4364-9FEC-DD0D72DEC592
Apple Watch - 38mm (5CEE5DAF-CB21-4364-9FEC-DD0D72DEC592) (Shutdown) (unavailable, device type not supported by runtime)
Wondering if Carthage could be updated to check for the "unavailable" label to avoid picking these destinations.
The simulator in question that is failing for me is watchOS 5.0 for 38mm, installed by Xcode 10-beta 6.
<key>com.apple.CoreSimulator.SimRuntime.watchOS-5-0</key>
<dict>
<key>com.apple.CoreSimulator.SimDeviceType.Apple-Watch-38mm</key>
<string>5CEE5DAF-CB21-4364-9FEC-DD0D72DEC592</string>
...
I believe this has been fixed on master: #2561.
Oh nice. Thanks!
Most helpful comment
This might be an issue with "unavailable" simulators. Running
xcrun simctl listmight turn up some simulators that are unavailable and need to be deleted.