Reputation: 4248
I'm trying to build a framework supporting Apple Silicon with Mac Catalyst using Xcode 12 beta 4. The project builds fine in Xcode with the "Any Mac" destination. If I use the command
xcodebuild -project "project.xcodeproj" -configuration "Release" -scheme "MyScheme" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac"
I get the error
xcodebuild: error: Unable to find a destination matching the provided destination specifier:
{ generic:1, platform:macOS, variant:Mac Catalyst, name:Any Mac }
Unsupported device specifier option.
The device “My Mac” does not support the following options: name
Please supply only supported device specifier options.
...
Ineligible destinations for the "MyScheme" scheme:
{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
{ platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
{ platform:macOS, variant:Mac Catalyst, name:Any Mac }
I'm not sure why the destination is listed as ineligible when it builds correctly in Xcode, or why xcodebuild seems to use the "My Mac" device when generic is enabled. How can I build for Mac Catalyst on Apple Silicon with xcodebuild?
Upvotes: 4
Views: 2837
Reputation: 4248
xcodebuild -project "project.xcodeproj" -configuration "Release" -scheme "MyScheme" -destination "generic/platform=macOS,variant=Mac Catalyst,name=Any Mac"
This command now works in Xcode 12 beta 5.
Upvotes: 7