IOS - 无法启动应用程序
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/11063736/
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
IOS - failed to start the app
提问by Genadinik
I just tried to run my test app and I got this error:
我只是尝试运行我的测试应用程序,但出现此错误:
2012-06-16 09:09:10.737 BusinessPlan[832:f803] Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard_iPhone' - perhaps the designated entry point is not set?
2012-06-16 09:09:10.737 BusinessPlan[832:f803] 未能实例化 UIMainStoryboardFile 'MainStoryboard_iPhone' 的默认视图控制器 - 也许指定的入口点没有设置?
How do I set the designated entry point? And what is that?
如何设置指定的入口点?那是什么?
Also, when I was going through their intro tutorials, the last time I ran the simulator was on the color-change step, and that worked for me.
此外,当我浏览他们的介绍教程时,我最后一次运行模拟器是在颜色变化步骤,这对我有用。
回答by Omar Abdelhafith
In your story board file select the viewController
you want to assign as first controller and check on is initial View Controller
check the image
在您的故事板文件中,选择viewController
您要指定为第一个控制器并检查is initial View Controller
检查图像
回答by Cocoadelica
I've not done an immense amount with storyboards yet, mostly with the older nib/xib based flow. However...
我还没有做过大量的故事板,主要是使用旧的基于 nib/xib 的流程。然而...
This looks like: When the app launches it creates an instance of UIApplication. This instance then needs to know what storyboard to go and connect to in order to create the user interface. Looks like that link is missing in your app. In the olden days you would either explicitly tell the app, in code, which nib to load or else you would have the link specified in interface builder. I believe in the world of storyboards it is now more abstract and disconnecting the interface from the app by mistake is not easy to determine and fix. I would recommend first going through the programming guide for storyboards on Apples developer site, or else start looking in the story board file for missing connections to it's delegate.
这看起来像:当应用程序启动时,它会创建一个 UIApplication 实例。然后,该实例需要知道要连接到哪个故事板以创建用户界面。您的应用中似乎缺少该链接。在古时,你要么明确地告诉应用程序,在代码中,这笔尖负荷,否则你将不得不在界面生成器中指定的链接。我相信,在故事板的世界,现在是更抽象和断开错误的应用程序接口是不容易确定和修复。我建议首先浏览 Apples 开发人员网站上的故事板编程指南,或者开始在故事板文件中查找缺少与其委托的连接。
This isn't an answer per se, apologies, more of a guide to where to find one.
抱歉,这本身并不是一个答案,更像是一个在哪里找到答案的指南。