Xcode 5 - 每次切换模拟器时“iOS 模拟器无法安装应用程序”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/18746093/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Xcode 5 - "iOS Simulator failed to install application" every time I switch simulators
提问by Tom Redman
Using Xcode 5 GM, anytime I switch to the 5.1, 6.0 or 6.1 simulators to test, I get the error "iOS Simulator failed to install application." When I reset the simulator it works, but this is getting very tiring.
使用 Xcode 5 GM,每当我切换到 5.1、6.0 或 6.1 模拟器进行测试时,我都会收到错误“iOS 模拟器无法安装应用程序”。当我重置模拟器时它可以工作,但这变得非常累人。
Anybody have a permanent fix or workaround?
有人有永久修复或解决方法吗?
回答by Tom Redman
Looks like this is a known issue. From the Xcode 5 release notes:
看起来这是一个已知问题。来自Xcode 5 发行说明:
After switching the minimum deployment target of an application from iOS 7.0 to a release prior to iOS 7.0, building and running the application may fail with the message “iOS Simulator failed to install the application.”
- Go to the iOS home screen, click and hold the application icon, then tap the hovering “X” button to delete the application.13917023
将应用程序的最小部署目标从 iOS 7.0 切换到 iOS 7.0 之前的版本后,构建和运行应用程序可能会失败并显示消息“iOS Simulator failed to install the application”。
- 转到 iOS 主屏幕,单击并按住应用程序图标,然后点击悬停的“X”按钮以删除应用程序。13917023
Another release note:
另一个发行说明:
iOS Simulator
- If an iOS app is detached, relaunching the same app from Xcode will result in a black screen in the Simulator even though the new app is launched. Terminate the app in the Simulator or relaunch it for the second time. 14648784
iOS模拟器
- 如果 iOS 应用程序已分离,即使启动了新应用程序,从 Xcode 重新启动同一个应用程序也会导致模拟器中出现黑屏。在模拟器中终止应用程序或第二次重新启动它。14648784
回答by Vince Yuan
Delete the old version app in your simulator (usually iOS 6.x).
删除模拟器中的旧版本应用程序(通常是 iOS 6.x)。
回答by Jay Versluis
Alternatively, header over to iOS Simulator - Reset Content and Settings.
或者,转到 iOS 模拟器 - 重置内容和设置。
This can be easier when you have a lot of apps on the simulator and can't remember which one you're currently working on.
当您在模拟器上有很多应用程序并且不记得您当前正在使用哪个应用程序时,这会更容易。
You need to do this for every iOS Simulator version that causes the problem.
您需要对导致问题的每个 iOS 模拟器版本执行此操作。
回答by Greg Haygood
None of the other suggestions worked for me. However, after comparing my existing app settings to a new vanilla project, I noticed that the "Build" field for my Target was blank. Once I put something in that field, the app installed just fine!
其他建议都不适合我。但是,在将我现有的应用程序设置与新的 vanilla 项目进行比较后,我注意到 Target 的“Build”字段是空白的。一旦我在该字段中放置了一些东西,该应用程序就安装得很好!
回答by Nico
if you have already developed project and you used xib to develop views then
如果你已经开发了项目并且你使用了xib来开发视图那么
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > and change from Xcode Default(5.o) to Xcode 4.6 .
Build and Run your app it will run successfully, if it won't run again then, header over to iOS Simulator - Reset Content and Settings. delete old app from simulator then Run again.
X-Code > Inspector Selector Bar > Interface Builder Document > opens in > 并从 Xcode Default(5.o) 更改为 Xcode 4.6 。
构建并运行您的应用程序,它将成功运行,如果它不会再次运行,请转到 iOS 模拟器 - 重置内容和设置。从模拟器中删除旧应用程序,然后再次运行。
回答by Learning Programming
i got the same problem but solved by following way....
我遇到了同样的问题,但通过以下方式解决了....
Launch the iOS Simulator
Go and click "iOS Simulator" menu
Click "Reset content and settings"
Close simulator and rebuild your app.
启动 iOS 模拟器
转到并单击“iOS 模拟器”菜单
点击“重置内容和设置”
关闭模拟器并重建您的应用程序。
Above screen shot is showing the way how you can do this...
上面的屏幕截图显示了如何做到这一点......
I think this works for you...!!!
我认为这对你有用......!!!
回答by user1105951
Deleting the app in the simulator works for me. just wanted to add that this happen only if I open xib that created in xcode 4.6 If it's other files, this not happen
删除模拟器中的应用程序对我有用。只是想补充一点,只有当我打开在 xcode 4.6 中创建的 xib 时才会发生这种情况如果是其他文件,则不会发生这种情况
回答by Shaik Riyaz
try this ....
尝试这个 ....
in my case nothing have worked for me , after resetting the content simulator also , i am not able to install the app on simulator . after that i just changed my project location . i just moved the project to other location . then it installed successfully.
在我的情况下,没有什么对我有用,在重置内容模拟器后,我无法在模拟器上安装应用程序。之后我只是改变了我的项目位置。我刚刚将项目移至其他位置。然后就安装成功了。
回答by user2758888
None of the above things worked for me. I just reinstalled xcode and it worked.
以上这些都不适合我。我刚刚重新安装了 xcode 并且它起作用了。
回答by migs647
Ran into this issue today. Found it was an empty Reference Folder (blue folder) causing this. Removed the folder from Resources in Build Phase... cleaned build folder for the heck of it, and it went away.
今天遇到这个问题。发现它是导致此问题的空参考文件夹(蓝色文件夹)。在构建阶段从资源中删除了文件夹......清理了构建文件夹,它就消失了。