Swift Tricks

My own, mostly internal blog of Swift tips and tricks

Today Widget failed to load error

Trying to debug a Today widget with Xcode can be quite a nightmare sometimes. Sometimes it just doesn't appear at all, sometimes it "Failed to load", other times the debugger does not connect.

Here's a process that I found works well (unfortunately has to be redone quite often):

  1. Run the regular app on your simulator so it installs properly (if you did this before, no need to do it again or to delete the previous)
  2. Restart the simulator using Device / Restart
  3. Run your app using the Today Widget scheme
  4. Now run the app manually on the simulator
  5. Finally rerun your app using the Today Widget scheme

Annoying as hell, but works so far.