xcodebuild: Unable to find a device matching the provided destination specifier
The simulator named in -destination does not exist on the machine.
01What you see
xcodebuild: error: Unable to find a device matching the provided destination specifier:
{ platform:macOS, arch:arm64e, id:..., name:My Mac, error:My Mac’s macOS platform doesn’t match edemo.app’s supported platforms. ... }
{ platform:tvOS Simulator, arch:arm64, id:..., OS:27.2, name:Apple TV 4K (4th generation), error:... }
From our own run of xcodebuild -workspace ios/edemo.xcworkspace -scheme edemo -destination 'platform=iOS Simulator,name=iPhone 99' build
02Why it happens
The simulator in -destination has to exist on the machine, with that exact name. Simulator names change between Xcode releases, so a name copied from an older setup is the usual cause. Xcode then lists every destination it does have, which is the long block after the error. Older Xcode versions word the first line as “Unable to find a destination matching”.
03The fix
To build for the simulator without naming a device, use the generic destination. This built in 49 seconds in our test:
xcodebuild -workspace ios/edemo.xcworkspace -scheme edemo -configuration Debug -destination "generic/platform=iOS Simulator" -quiet build
To run tests you need a real simulator name. List the ones the machine has, and use one of them:
xcodebuild -workspace ios/edemo.xcworkspace -scheme edemo -showdestinations
On our default image this lists simulators such as iPad (A16) and iPad Air 11-inch (M4), all on iOS 27.2.
04How we checked
On 25 November 2026 we started a fresh machine from our default image (Xcode 27.2), made a new project, caused this error on purpose with the command above, then ran the fix until it built. We do the same before adding any page to this list.
More on this kind of project: the guide. Other errors: Common errors. Still stuck? Send the build URL to support@macbuildcloud.com.