Strange problem for widgets on iOS 16.1 - Cannot debug widget extension in Xcode 14.1

Since I upgraded my phone to iOS16.1 I notice that my widget app doesn't refresh timeline as expected. Then I notice that other apps are having this problem as well. As far as I know from my research, iOS 16.1 has a bug regarding widget accessing calendar database.

Then I continue my work on Xcode and also found that I cannot debug widget extension timeline on a simulator.

  • If I run widget extension on a simulator with iOS16.0, it runs just fine and I can see all the printouts.
  • If I run widget extension on a simulator with iOS16.1, it doesn't give a printouts at all. And it shows 'Waiting to Attach'

Has anyone experience this?

Apple broke widgets debugging in Xcode 14.1 😭

See Xcode 14.1 Release Notes:

After Running a widget extension, users will need to manually start the debugging session with Debug -> Attach to Process. (99285608)

Same. For the moment, till it is fixed, I have worked around by using the 16.0 simulator as you mentioned.

Any updates on this? Using Xcode 14.2 but problem is still the same. No print out from widget extension on iOS 16.1+ Need to use iOS16.0 for debugging.

Wasted 6 hours on this. Solution is to use an older iOS version for the simulator. I am currently using 15.5! 16.2 does not work as expected.

I could get it to work on a real device by running the extension. Then Xcode says: Waiting to attach. Then bring up the add new widget UI on your device and search for your widget there. Stop when you see your previews and select in Xcode -> Debug -> Attach to process -> Your Process should be in Likely Targets. Click that and you should be able to debug.

Update! It is working as expected as of May 2023.

My Settings: Mac Ventura 13.3.1(a) Xcode 14.3

Works on both real device and simulator with iOS16.4.

Now we can get back to work. lol

Strange problem for widgets on iOS 16.1 - Cannot debug widget extension in Xcode 14.1
 
 
Q