Post

Replies

Boosts

Views

Activity

xcodebuild for generic/platform=iOS Simulator is failing on my MacBook
I am having a framework that I am building using a buildscript using xcodebuild. The framework archives for all architectures required so that it can be used in another Xcode project. However, since I have installed Xcode 14, the build script gives an error when I am building for iOS Simulator. I do need to build the framework for iOS simulator as well so that developers can test their app that use the framwework on an iOS simulator. The command line to archive the framework for iOS Simulator is: xcodebuild archive -scheme <TargetName> -destination 'generic/platform=iOS Simulator' -archivePath <ArchivePath> SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES The error I am getting is: xcodebuild: error: Unable to find a destination matching the provided destination specifier: { generic:1, platform:iOS Simulator } This works well for all other destinations I am building the framework for (watchOS, iOS, watchOS Simulator), just not for iOS Simulator In the output of xcodebuild is shows the available platforms. Among all the specific Simulators that are available, it also has a 'generic' entry for the 'watchOS Simulator' destination: { platform:watchOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-watchsimulator:placeholder, name:Any watchOS Simulator Device An equivalent entry is not available in the list for 'iOS Simulator' as you can see in the output of xcodebuild below. Is this the problem I am facing and should there be a similar 'Any iOS Simulator Device' entry in this list? And if this is the problem, how can I add a generic 'iOS Simulator'? If not, what could be the problem instead? For complete information, this is the full output of the xcodebuild command: Command line invocation: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild archive -scheme <SCHEME> -destination "generic/platform=iOS Simulator" -archivePath Archiver/<archive-name>.xcarchive SKIP_INSTALL=NO BUILD_LIBRARIES_FOR_DISTRIBUTION=YES User defaults from command line: IDEArchivePathOverride = /<directory>/<archive-name>.xcarchive IDEPackageSupportUseBuiltinSCM = YES Build settings from command line: BUILD_LIBRARIES_FOR_DISTRIBUTION = YES SKIP_INSTALL = NO 2022-10-03 16:18:52.358 xcodebuild[17449:3179785] Writing error result bundle to /var/folders/lj/n7mj7ccd3dd4fds0x_0jh0w00000gn/T/ResultBundle_2022-03-10_16-18-0052.xcresult xcodebuild: error: Unable to find a destination matching the provided destination specifier: { generic:1, platform:iOS Simulator } Available destinations for the <scheme-name> scheme: { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:41E4E96D-C631-58DB-8E17-3556BF095CE6 } { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device } { platform:macOS, variant:Mac Catalyst, name:Any Mac } { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device } { platform:watchOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-watchsimulator:placeholder, name:Any watchOS Simulator Device } { platform:watchOS Simulator, id:85EAEDB9-281C-4C42-BB07-D381344B4F01, OS:9.0, name:Apple Watch SE (44mm) (2nd generation) } .... And more specific Simulator devices as configured in Xcode .... { platform:iOS Simulator, id:CC7BF3A6-62CB-4AC3-9E13-ED20DA1CC9E0, OS:16.0, name:iPhone SE (3rd generation) }
4
0
4.6k
Oct ’22