Keep the Widget Alive Longer (Debug Build Trick)
In the widget’s code (under a #if DEBUG
check), add a small delay so Instruments has time to attach:
#if DEBUG _ = DispatchSemaphore(value: 0).wait(timeout: .now() + 30) #endif
Remove this workaround before shipping.