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

Replies

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?

Add a Comment

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.

  • previewing macOS widgets is no longer supported. You can find some ideas for how you can develop your widget in the documentation at https://developer.apple.com/documentation/widgetkit/debugging-widgets

  • @Developer Tools Engineer thanks for reply. Yes, my widget is fully macOS one (source code https://github.com/bobrosoft/macos-yandex-weather-widget). So, SwiftUI previews are not working for macOS Widgets anymore in Ventura? I tried to run older Xcode 13.4 on Ventura -- seems previews not working as well, seems as issue is in macOS. I checked the link you posted but didn't get it clearly what to do now: you suggest to add iOS as target to see previews or debug things only manually? Thanks.

  • yes, correct. macOS widget previews is not available in current releases. My suggestions would be to use the macOS WidgetKit Simulator app and/or take advantage of the iOS preview support for widgets to do the majority of the development, and then final touches using the widget running on the mac.

Add a Comment

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.

Add a Comment

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

  • We believe we improved the error you would see with current Xcode. What is the wording of the error you are seeing, and with what version of macOS and Xcode?

Add a Comment