Currently I have an iOS app that I am trying to build for Mac Catalyst, unfortunately when building I get the following error for some of my different targets:
Building for Mac Catalyst, but the embedded app extension 'ShareExtension.appex' is building for iOS. You may need to configure 'ShareExtension.appex' to build for Mac Catalyst or restrict the platforms for which this app extension should be embedded in the target editor.
How do I disable the share extension when MacOS is the platform I'm building for?
The solution is to go to your main app's:
Target > General > Frameworks, Libraries & Embedded Contant
Then for the following extensions that aren't supported, select the Platforms as only iOS or MacOS, it should look like the following:
Make sure to Clean & Rebuild when done!

The solution for me was to go to the target settings of the extension that causes trouble, and setting "Supported Platforms" to the correct platform(s).
The issue was that these settings were taken from the projects default settings which included a platform that was not supported for the extension.
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