Xcode: “Scene is unreachable due to lack of entry

2019-01-16 13:23发布

Xcode 4.5.2 gives me the following warning:

Unsupported Configuration    
Scene is unreachable due to lack of entry points and does not have an identifier 
for runtime access via -instantiateViewControllerWithIdentifier:.

Unfortunately I can't identify the incriminated scene. Selecting the warning in the Issue Navigator doesn't highlight anything in the Storyboard. I have a fairly complicated storyboard (30+ scenes).

Any suggestions?

Screenshot for warning

22条回答
聊天终结者
2楼-- · 2019-01-16 14:15

While this thread is old, I didn't see an answer describing what worked for me, so here goes...

I had this error and visual examination of the storyboard showed that all of the view controllers appeared to be connected to the root view controller.

I tried naming all 17 of the view controllers in the storyboard (as in @bobnoble's answer). I used a naming convention based on the long name of the view controller, e.g. "jvc" for "Jobs View Controller". When I tried to build, I got an error message pointing to one of the view controllers as having a duplicate name. Tracking things down, I found that I had an actual duplicate of a view controller stacked exactly on top of its twin. I suspect it was cut-and-paste damage from a user interface experiment that I didn't back out completely.

Anyway, deleting the unconnected twin solved my problem. After that, I removed all of the VC names as they're not referenced in the code.

查看更多
淡お忘
3楼-- · 2019-01-16 14:15

I don't know if this hasn't been mentioned yet or not but another reason you could get this warning is if you have a segue going in the wrong direction. For example, in my project I was getting this warning but all my controllers were in fact connected. However, one of them had a segue that basically was trying present the parent from the child instead of the parent presenting the child. This caused the same warning.

查看更多
Melony?
4楼-- · 2019-01-16 14:17

I got this warning when i am having a UIViewController in Storyboard to which nothing is set. I avoided this warning by setting Storyboard ID to it.

查看更多
不美不萌又怎样
5楼-- · 2019-01-16 14:19

Simply giving all MVCs a storyboard id worked for me.

查看更多
登录 后发表回答