Ineligible destinations { platform:macOS, name:Any Mac }

I have download Xcode 12 for universal apps. I do not have VALID_ARCHS set at all and I can build FAT binary from Xcode IDE just fine.

I have also installed CommandLine tools for Xcode 12, but when I try to build from the Terminal, I get just Intel binaries. Trying the -showdestinations option gives the following error: Ineligible destinations { platform:macOS, name:Any Mac }. If I try to set VALIDARCHS = arm64 to try build for ARM only, I get an error too. { platform:macOS, arch:x86_64h, error:My Mac doesn’t support any of targets’s architectures. You can set target’s Architectures build setting to Standard Architectures to support My Mac. }

I have not found Command Line Tools for Xcode 12 Universal apps so maybe the Command Line Tools I have are for the standard Xcode 12 and can't build universal apps?

Any ideas what might be wrong?

Replies

Had a similar issue when cross building from an intel mac to an M1 mac target.

My issue was that I specified xcodebuild archive -project 'path/to/my/proj.xcodeproj' -destination 'platform=macOS,arch=armv8'

But to use a "build" and not a "build and run" target the destionation needs to be prepended with generic/

So in my case it would be something like

xcodebuild archive -project 'path/to/my/proj.xcodeproj' -destination 'generic/platform=macOS,arch=armv8'

Or if you have multiple architectures specified in your project already probably just

xcodebuild archive -project 'path/to/my/proj.xcodeproj' -destination 'generic/platform=macOS'