macOS widget preview error

Following article Creating a widget extension on developer.apple.com (https://developer.apple.com/documentation/widgetkit/creating-a-widget-extension) I encountered a problem with XCode preview: it shows an error with message

|  RemoteHumanReadableError: Failed to launch agent
|  No plugin is registered to launch the process type widgetExtension.

Can someone help me?

macOS 13.4 XCode 14.3.1

Hi,

Sorry to hear you are having problems getting widget previews working. To know for sure we'd need to see the full diagnostics from the banner you are hitting, which you'd have to provide to us via a feedback as the forums here can't deal with those kind of attachments.

That said, a guess would be that you are trying to preview a macOS widget which is not supported. Do the widget previews work for you in a new iOS template project with a new template widget extension?

Hi,

Yes, I'm trying to preview a macOS widget. Is there a plan to support it in the near future?

I have the same issue, can't preview widget's views or run widget to preview it. Xcode 14.3.1. Getting "No plugin is registered to launch the process type widgetExtension." Diagnostic files for the preview issue can be found here: https://www.dropbox.com/scl/fi/4h4bolgm20g9f0o755rgv/previews-diagnostics-20230827-204404.zip?rlkey=tkjpr639gi4svhq21rw2iaz49&dl=0

My widget project originally was created in Xcode 13.4 on Intel i5 and all worked. Not working now on Xcode 14.3.1 with M2 Pro.

FYI Apple, I have been searching all over the place for hours trying to figure this out. Wherever it is said that you can't preview macOS widgets, Google couldn't find it, and I couldn't either, nor is it mentioned in anything I could see in the WWDC videos about this topic.

I'm having the same issue and this just looks like I've done something wrong as a developer with this error rather than it not being supported by Xcode/Previews any more - kind of sucks as a dev experience as I could have just wasted a ton of time trying to fix something that isn't broken

macOS widget preview error
 
 
Q