Fixing “iOS Simulator failed to install the application”

Occasionally while I’m trying to build an iOS app I’ll get this error when I try to run it:

“iOS Simulator failed to install the application”

Usually I’ve made a huge change to the application since its last run, like completely regenerating the source code and rebuilding it.

As suggested by this StackOverflow article, there’s a simple fix. From a shell prompt, run:

rm -rf ~/Library/Application Support/iPhone Simulator

The try to run your application in the simulator again and you should be all set.