WidgetKit and VisionOS

Hello all,

Is there any best practice how it's possible to add native visionOS support for existing app, that already includes WidgetKit extension, where both targets should share some files?

"Your target is built for visionOS but contains embedded content built for the iOS platform (WidgetsExtension.appex), which is not allowed"

Thanks a lot!

Replies

OK - Found it! When adding WidgetKit extensions to the main target, apply filter for these widgets and uncheck the VisionOS Platform.

Enjoy.