openAppWhenRun makes AppIntent crash when launched from Control Center.

Adding the openAppWhenRun property to an AppIntent for a ControlWidgetButton causes the following error when the control is tapped in Control Center:

Unknown NSError The operation couldn’t be completed. (LNActionExecutorErrorDomain error 2018.)

Here’s the full ControlWidget and AppIntent code that causes the errorerror:

Should controls be able to open apps after the AppIntent runs, or is this a bug?

Answered by daviorze in 794663022

I found the solution.

The control file must have the Target Membership with the App and Widget Targets to work.

You can't create the control only linked to the Widget extension.

Something like this image.

Same problem here!

+1

Accepted Answer

I found the solution.

The control file must have the Target Membership with the App and Widget Targets to work.

You can't create the control only linked to the Widget extension.

Something like this image.

openAppWhenRun makes AppIntent crash when launched from Control Center.
 
 
Q