Error: unreachable because it has no entry points

2020-05-23 02:05发布

Using Swift I got the error that my "TableViewController" is unreachable because it has no entry points and no runtime access via [UIStoryboard instantiateViewControllerWithIdentifier].

In my View Controller class there is the suggestion to fix it while changing instantiateViewController(withIdentfier...) in instantiateViewController(withIdentifier).

Shall I do this or how do I fix this?

标签: ios swift
11条回答
▲ chillily
2楼-- · 2020-05-23 02:55

Just add an ID in Storyboard ID (and restoration ID in case) enter image description here

查看更多
冷血范
3楼-- · 2020-05-23 03:02

This is my error.

warning: Unsupported Configuration: “View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].

enter image description here I delete the code in ViewController , but I don't disconnect the connect in ViewController of Main.storyborad.

查看更多
小情绪 Triste *
4楼-- · 2020-05-23 03:04

I had the same problem. I figured out that I had forgotten to add an "ID" to my Tab Bar Controller. Hope this help somebody.

enter image description here

查看更多
一夜七次
5楼-- · 2020-05-23 03:06

I'd reached the same error. This answer would be useful, I think: Xcode: "Scene is unreachable due to lack of entry points" but can't find it

The problem was that because of some experiments and copy-pasting I had an actual copy of a view controller located outside the visible part of the screen or it could be stacked exactly on top of its twin. So I just deleted unwanted one :-) You should open Document Outline and сheck for copies :-)

Document Outline is showing 2 the same ViewControllers

查看更多
爱情/是我丢掉的垃圾
6楼-- · 2020-05-23 03:08

In my case I accidentally deleted Storyboard Entry Point without knowing, and app wasn't starting,

After several undo's, I saw the problem and corrected it

enter image description here

查看更多
登录 后发表回答