首页 > 代码库 > Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard' - perhap

Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard' - perhap

iOS 出现错误:Failed to instantiate the default view controller for UIMainStoryboardFile ‘MainStoryboard‘ - perhaps the designated entry point is not set?

这个问题的原因应该是在你的StoryBoard中没有一个view controller设置了Initial Scene。您需要选择一个view conroller作为story board的第一个界面:


如果你已经设置了,但还是有错误,那么按shit+ command+k来clean一下,然后运行试一试。

我的就是clean一下就好了,不知道什么原因。

Failed to instantiate the default view controller for UIMainStoryboardFile 'MainStoryboard' - perhap