Reputation: 595
I have a SwiftUI App with widgets all works fine in the catalyst version or compiling the widgets directly for macOS, but when I add it to the macOS target (not catalyst) I get the following error
/Users/franciscomisaellanderoychante/proyects/Revisits/Revisits.xcodeproj Building for macOS, but the embedded app extension 'revisitsWidgetExtension.appex' is building for iOS. You may need to configure 'revisitsWidgetExtension.appex' to build for macOS.
But like you can see the widgets are actually target for macOS too
in the macOS I have this selected
What im trying to do is to use the existing widget with the macOS app
any idea of what is happening?
Upvotes: 3
Views: 1062
Reputation: 595
Finally I found the solution you have to add a new widget extension target to macOS (The iOS widget only works on Catalyst)
Once you do that you can use the same configuration and files that you used on the iOS extension just add the new widget to the target and done.
Upvotes: 6