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

后端 未结 22 1624
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 04:09

Building an iPhone project results in:

Failed to launch simulated application: SpringBoard failed to launch application with error: 7

22条回答
  •  粉色の甜心
    2020-12-08 04:26

    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.

提交回复
热议问题