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!

Answered by DudiSG in 779559022

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

Enjoy.

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

Enjoy.

Please reply here if you into additional issues in the future.

Rico
WWDR - DTS - Software Engineer

WidgetKit and VisionOS
 
 
Q