Xcode 5 IOS 模拟器黑屏和应用安装失败

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/19041556/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:56:25  来源:igfitidea点击:

Xcode 5 IOS simulator black screen and app install fails

xcodeios7osx-mountain-lionxcode5

提问by User093203920

I just updated my xcode to work with ios7. Now whenever I make a new app, even if its set to build for ios7, I get an error in the simulator when running. It says that the install failed, even if I just made the project and haven't coded anything into it yet. The simulator also shows a black screen. I have tried the reset content, and it didn't work. I saw something somewhere saying to delete the Iphone Simulator folder in application support, but no such folder seems to exist. What can I try to do?

我刚刚更新了我的 xcode 以使用 ios7。现在,每当我创建一个新应用程序时,即使它设置为针对 ios7 构建,我在运行时也会在模拟器中收到错误消息。它说安装失败,即使我刚刚制作了该项目并且尚未对其进行任何编码。模拟器还显示黑屏。我试过重置内容,没有用。我看到某处说要删除应用程序支持中的 Iphone Simulator 文件夹,但似乎不存在这样的文件夹。我可以尝试做什么?

Update--

更新 -

With some additional research, I found that Iphone Simultor is in the Xcode.app now, but I don't know what to delete. There are many files under the iPhone Simulator Folder. If I delete the actual app, it just doesnt open. Any ideas?? I dont even get an iphone on the screen, just a black window...

通过一些额外的研究,我发现 Iphone Simultor 现在在 Xcode.app 中,但我不知道要删除什么。iPhone Simulator 文件夹下有很多文件。如果我删除实际的应用程序,它就不会打开。有任何想法吗??我什至没有在屏幕上看到 iphone,只有一个黑色的窗口......

Update 2:

更新 2:

Even when I just go to open developer tools -> iphone simulator it still gives me just a black screen....enter image description here

即使我只是打开开发人员工具 -> iphone 模拟器,它仍然给我一个黑屏......在此处输入图片说明

enter image description here

在此处输入图片说明

Update 3

更新 3

I just re-installed X-code, and all works now! Strange....I have no idea what happened...But I thought I would let y'all know for others who have similar issues.

我刚刚重新安装了 X-code,现在一切正常!奇怪......我不知道发生了什么......但我想我会让你们都知道其他有类似问题的人。

回答by Dirk

Deleting the iOS Simulator folder of the iOS version in question in

删除有问题的 iOS 版本的 iOS Simulator 文件夹

/Users/xxx/Library/Application Support/iPhone Simulator

helps, but then you always have to repeat all the settings you made in the simulator (language, for example). Try to press the home button and then delete your app like you do it on a real iOS device. You should then be able to install it again.

有帮助,但是您总是必须重复您在模拟器中所做的所有设置(例如语言)。尝试按下主页按钮,然后像在真正的 iOS 设备上那样删除您的应用程序。然后您应该能够再次安装它。

This seems to be a known issue.

这似乎是一个已知问题

回答by Elad Shevah

When simulator open - Go to iOS simulator tab -> reset content and settings.. Work for me.

当模拟器打开时 - 转到 iOS 模拟器选项卡 -> 重置内容和设置.. 对我来说有效。

回答by Kyle Bachan

Perhaps thisanswer will help?

也许这个答案会有所帮助?

The simulator should be in this folder:

模拟器应该在这个文件夹中:

/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iOS Simulator.app

回答by Shantanu

Make sure any @try and @catch(NSException *exception) {} blocks are not commented or are working properly.

确保任何 @try 和 @catch(NSException *exception) {} 块没有被注释或正常工作。

回答by Iman

This is a version mismatch between your OS X version and your Xcode (iOS simulator) and it seems that you have upgraded your OS X so Xcode needs to be upgraded as well, Check the versions that match with each other.

这是您的 OS X 版本和您的 Xcode(iOS 模拟器)之间的版本不匹配,而且您似乎已经升级了您的 OS X,因此 Xcode 也需要升级,检查彼此匹配的版本。

You need to upgrade your Xcode which will upgrade iOS simulator.

您需要升级您的 Xcode,这将升级 iOS 模拟器。

Good Luck,

祝你好运,