Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPhone Simulator: SpringBoard failed to launch application with error: 7

I had the exact same problem - I reset the iphone simulator and then quit the simulator (i.e. command q) then started it again.

Worked.


Boy, is the answer to this one hard to find, but I came up with a workaround. The simulator gives this error if it has any problems with accessing files in ~/Library/Application Support/iPhone Simulator/. This could be a permissions problem, but in my case it was even more subtle: my home directory is NFS mounted, and that seems to somehow be the source of the problem.

The basic workaround is to create a directory local to the machine, and link the iPhone Simulator's directory to that local directory. You shouldn't need to move your source files or project directory; it's just the simulator targets that are the problem.

Here is one series of steps to accomplish the workaround, to be typed in at the terminal (1-3 done on every machine you'll be developing on, 4-6 once in your NFS-mounted home directory):

  1. sudo mkdir /usr/local/iphone-dirs
  2. sudo chmod 777 /usr/local/iphone-dirs
  3. mkdir /usr/local/iphone-dirs/my-dir
  4. cd "~/Library/Application Support/"
  5. rm -rf "iPhone Simulator/"
  6. ln -s /usr/local/iphone-dirs/my-dir/ "iPhone Simulator"

There are obviously many variations on this theme; I suspect that using a locally-hosted directory in /tmp would be fine (and not require admin privs, but would have to be redone every time the system is rebooted). As given, steps 1 and 2 are good if you will have multiple users using these machines that you don't want to collide with each other. If you have your own personal machine but NFS-mount your homedir, you could probably just skip to something like step 3 (and sudo it). Just make sure that whatever dir you create in step 3 is the dir that you symlink to in step 6.


No need to quite the simulator or delete the app..

Just select simulator, press command + shift + h + h and remove the app from background process(long press on app icon) then run your app again.


I started with a new project in Xcode and got the error 3 message, but otherwise same deal. New damn project - so no problems with broken code I added or name mistakes or anything else. But the app would build but fail to run in Simulator with the Springboard -3 error code. I've seen this before lots of times, and the basic kill-the-app-in-simulator, clean-and-run would work, but not this time.

Turns out my old 2007 iMac barely has enough RAM and disk space free any more. I'm running Mavericks, and I hid everything but Xcode and the Simulator, then ran a memory cleaning utility to free up every bit of RAM available (got back up to 1GB free or so), and then the app runs in the Simulator without a hitch. No more Springboard error.

I hadn't seen "too little RAM" listed as a reason for this error yet, so this may be useful for somebody else.