WidgetKit extenstion

Hi,

I'm trying to create a macOS widget for my application. I'm following the official Apple documentation.

When trying to run the widget, I get the following error: The operation could not be completed. (CHSErrorDomain error 1103.)

Is there a list somewhere that explains the error codes? I thought we were past error codes in modern software development...

Answered by Engineer in 766941022

The best way to begin debugging a WIdget is to use Console.app and monitor your Widget's process (the name of your target) to gather additional information on what is happening.

The best way to begin debugging a WIdget is to use Console.app and monitor your Widget's process (the name of your target) to gather additional information on what is happening.

Thanks, I should have thought of that. Error 1103 means: Intent configuration is required but was not provided.

This error occurs when I add a WidgetKit extension to my existing project. It looks like it is looking at some different configuration, or that my existing project messes things up. The happy flow, where you create a blank app from scratch and add an extension to it, just works, off course. It is my intention to add it to an existing app.

If someone can point me to how to troubleshoot this beyond looking at the console, I'd be very grateful.

I'm also hitting this issue, exactly as described when trying to add a new widget target to an existing Multiplatform app.

Did you ever find a solution?

Bumping: I am troubled by this exact issue, error code 1103. When making a configurable widget for a fresh multiplatform app, I can run it on the Mac just fine in widgetSimulator.

Though, when I add a new configurable widget target to my own (existing) multiplatform app, I get the 1103 error. Same boiler plate code. Since the two widgets have identical code, I'm having trouble identifying what part of my app stands in the way of this. Maybe it's that I used to use the old Siri Intents?

What's interesting to note is that adding a new static widget target (by unchecking the 'add configuration' checkbox), runs just fine also.

For me the problem was the default value for Parameters (@Parameter). I've used AppEntity and EntityQuery. In ...:EntityQuery the function "defaultResult" was not overwritten...

It seems "older" app versions (without intent) needs to be deleted from Applications.

Yep, delete the old app from the Applications folder, doh.

WidgetKit extenstion
 
 
Q