Can You Debug a Widget on Actual Device?

I'm working on an iOS app with a Widget. I am able to display the Widget on the iPhone 16 Pro Simulator. It doesn't appear on iPad mini 6th gen., though. Anyway, I want to make sure that it works on an actual device. If I try to add the Widget to the Home Screen, I cannot find it in the search list on iPhone XR and iPad 9th gen. If I set the target to that of the widget, Xcode gives me the following error.

SendProcessControlEvent:toPid: encountered an error: Error Domain=com.apple.dt.deviceprocesscontrolservice Code=8 "Failed to show Widget 'some bundle ID' error: …

I hope that's not a sign of trouble. So how do you debug a Widget on an Actual Device? I've read some topics like this one here. Thanks.

Houston, I think I have a problem. If I run a sample iOS app with a Widget, I can search and find it. This isn't good.

Accepted Answer

Houston, now, the Widget appears on my iPhone and iPad. I don't get it. I did change the deployment target to iOS 17.6 before it appeared on my devices. The OS version on my iPad is 18.5. I don't know why it didn't appear on my iPad earlier.

Can You Debug a Widget on Actual Device?
 
 
Q