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 13:54

I had the same issue. I've got lots of views on my storyboard with a nav and tab bar controller. For me it was just be a warning to let you know that some of the views are not connected. Make sure all your views are connected in some way to the root view controller. I was starting this project from scratch to eliminate this warning and noticed the same warning when a view wasn't connected.

查看更多
走好不送
3楼-- · 2019-01-16 13:56

You don't need to set Storyboard ID for all scenes or UINavigationController

Well I have around 50-60 scenes and I just got these warning so that I realise that only the controller(Scene) or NavigationController which is not connected with segue needs to set Storyboard ID.

enter image description here

You can see that in above image UINavigationController is not connected with segue, it was a culprit of that warning.

Just give it a Storyboard ID to remove this warning.

查看更多
Explosion°爆炸
4楼-- · 2019-01-16 13:56

I came to this question today. I'm using Xcode 6.3 and the answer to the OP's question is quite simple now:

Select the View Controller you wish to be the first one, show the Attributes Inspector, and under the View Controller section, make sure

Is Initial View Controller

is checked. Voilà!

查看更多
Melony?
5楼-- · 2019-01-16 13:59

i faced same problem and solved with put on storyboard ID any identifier for all viewController and NavigationController also; the error will be removed immediately

enjoy!!!

查看更多
smile是对你的礼貌
6楼-- · 2019-01-16 13:59

I got the same error : For me the error was I did not initiate a view controller in my story board.

Fixing that removed that warning.

查看更多
成全新的幸福
7楼-- · 2019-01-16 14:00

Simplest way to find the offending scene:

Go to the issue navigator (in the left panel, next to the search button), and double click the error. A window will popup containing the offending scene centered in the middle of the window.

(This is actually generally true - double clicking any error will generally result in a popup containing the error centered - a neat little trick!)

Side note: Sometimes, XCode will incorrectly give this error for a scene that is the root view controller of a navigation controller (that is the initial view controller). Simple fix is giving this root view controller a Storyboard ID, compiling (error should go away), and then removing the storyboardID (no error anymore).

查看更多
登录 后发表回答