After updating to Xcode 11, a framework project, with an iOS only dependency, has started to fail building from command line.
Initially it failed with:
error: Building for Mac Catalyst requires macOS 10.15 or later. (in target 'X iOS' from project 'X')
Changing SUPPORTS_MACCATALYST
to NO
it fails with:
xcodebuild: error: Failed to build project X with scheme X iOS.
Reason: The run destination My Mac is not valid for Running the scheme 'X iOS'.
And sure enough My Mac
is listed in the possible run destinations.
How can I get this removed?
As mentioned, you can only run iOS apps on your Mac if your computer has an Apple Silicon chip. To check if your device is capable, follow these steps below: Click on the Apple logo in the top left corner of your screen. Click on About this Mac.
Running Your App in the Simulator or on a Device. 1 Choose a Scheme. A scheme is a collection of settings that specify the targets to build, the build configuration, and the executable environment for ... 2 Select a Simulated Device. 3 Select a Real Device. 4 Run the App.
If you choose a real device, add your Apple ID in Accounts preferences and assign the project to a team on the Signing & Capabilities pane of the project editor. A single individual constitutes a one-person team.
So the culprit turns out to be a test target that had SUPPORTS_MACCATALYST = YES
. If just a single target in your project has SUPPORTS_MACCATALYST
set to YES
then My Mac
will show up.
I've had a similar issue. What worked for me was setting:
SUPPORTED_PLATFORMS = "iphonesimulator iphoneos";
As well as setting:
SUPPORTS_MACCATALYST = NO;
DERIVE_MACCATALYST_PRODUCT_BUNDLE_IDENTIFIER = NO;
It did not work the first time, but it worked after I switched the Support Mac Catalyst option from NO to YES and back to NO again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With