iosxcodewidgetinstrumentssimulator

How to profile iOS widgets in Instruments?


In order to stay under the 30 MB memory limit for widgets I'd like to profile the widget in the Simulator in Instruments. However, Instruments doesn’t start the profiling session with the error message: Unable to install app with path: …

All I did in Xcode: I created a fresh scheme for the widget target and selected "Profile".

Is this supposed to work?

Update: As suggested by @lll in the comments, I tried to profile the host app, then attach Instruments to the Widget process. However, this fails as well, see screenshot. It might be because the Widget process only runs for a very short time. enter image description here


Solution

  • Keep the Widget Alive Longer (Debug Build Trick)