Thanks for being a part of WWDC25!

How did we do? We’d love to know your thoughts on this year’s conference. Take the survey here

Widget Previews in visionOS 26 Beta (Xcode 26 Beta)

Hello,

I'm currently developing for visionOS using Xcode's latest beta version.

I have a question regarding Widget Previews for visionOS 26:

When I create a new Widget Extension target directly from a visionOS project, the generated code does not include the #Preview macro.

Following the documentation, I manually added the #Preview macro to a Widget created within a visionOS project, but Xcode then displays an error stating that "This platform does not support previewing widgets."

My interpretation is that Widget Previews are currently not supported for Widgets created specifically for visionOS in this beta version. Is this understanding correct? Or am I missing a specific way to implement previews for visionOS Widgets, or is there a particular project setting I might have overlooked?

Any clarification or guidance on this matter would be greatly appreciated.

Thank you.

Answered by Developer Tools Engineer in 844368022

Hi,

You are correct that widget previews are not available for visionOS.

Best workaround I can think of to use previews to develop your widget is to do so in an iOS app + iOS widget target.

Accepted Answer

Hi,

You are correct that widget previews are not available for visionOS.

Best workaround I can think of to use previews to develop your widget is to do so in an iOS app + iOS widget target.

Widget Previews in visionOS 26 Beta (Xcode 26 Beta)
 
 
Q