开发者

Failed to launch simulated application: iOS Simulator failed to install the application

开发者 https://www.devze.com 2023-02-07 17:01 出处:网络
When I create a new window based application, I get: Failed to launch simulated application: iOS Simulator failed to

When I create a new window based application, I get:

Failed to launch simulated application: iOS Simulator failed to install the application.

I tried to do what this post suggest, but didn't work

开发者_如何学JAVA

Any suggestions? I haven't tried re-installing xcode yet.


  • Choose Reset Content and Settings in the File menu of the Simulator.

  • Build Clean in Xcode

  • Then try again.


I'm not sure why, but rebooting my machine seemed to fix it.


I had the same problem. A reboot also did the trick, but then I realized that the directory

~/Library/Application Support/iPhone Simulator/6.1/

looked "different" after the reboot (Directory "Root" was missing). So I tried to reproduce the error by deleting the directory or parts of it. The simulator each time recreated the directory and worked fine. Maybe the reboot is not really needed just recreating the mentioned directory would also help.


Try to delete project.xcworkspace file and xcuserdata dirctory in your project


It seems that the processes don't get cleaned up properly each time you stop the app with ps aux in Terminal showing a large number of processes representing your app on the simulator.

I expect some kind of upper limit is reached with the number of processes / memory. (Indeed I have found that XCode will fail to build because some posix resource can't be found because there isn't memory to load it)

A machine restart clears all of these dead processes and allows room for new ones. For me, I only have to do this after about 2-3 weeks of not turning my computer off, but I suppose what resources you have and how often you use the Simulator will affect it.


If someone knows how to clear all these dead processes without restarting, that would be useful please, killall ... doesn't seem to have worked for me, but feel free to add to this answer.


Simply go the info.plist file property and set 'Copy to Output Directory' to 'Copy Always' it will resolve your problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消