Reputation: 411
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?
Upvotes: 39
Views: 57762
Reputation: 3028
The problem is exactly as the warning says: this View Controller is unreachable because it has no entry points.
If you have only one View Controller then this controller is missing its entry point. You can fix this by setting this View Controller as "Is Initial View Controller".
If you have several View Controllers and this View Controller is not in the beginning of your storyboard sequence, then you are missing a segue which should display this View Controller. You can fix this by adding a segue which should show this View Controller.
In general, Xcode tells you that this View Controller is not connected to the storyboard sequence because it has no incoming connections.
Upvotes: 0
Reputation: 38833
You need to mark a viewController
in your Storyboard
and set it to the initial viewController
. You do this under the Attributes Inspector
. This means that you set which viewController shall open when you start your application.
Upvotes: 51
Reputation: 1390
When you have 2 or more navigation controllers(embedded UIVIewcontrollers) or 2 or more UIViewcontrollers in your storyboard. Xcode may be looking for a startup view controller. You can mark either of one of them as startupviewcontroller, just by selecting the "is initial viewcontroller"
OR you can give a unique storyboard id for each and every UInavigationcontrollers or UIViewcontrollers or UITabviewcontrollers in your storyboard.
Upvotes: 1
Reputation: 1
I had same issue that to solve this problem I opened the Document Outline then realized that I have accidentally deleted the Segue between two pages.
Steps:
1) Editor> Show Document Outline document outline
2) Check the Document Outline for any copy-paste
, segue error or etc.
screenshot
Upvotes: 0
Reputation: 1
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.
Upvotes: 0
Reputation: 806
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
Upvotes: 1
Reputation: 475
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:].
I delete the code in ViewController , but I don't disconnect the connect in ViewController of Main.storyborad.
Upvotes: 0
Reputation: 6066
I fixed this by renaming the default "ViewController.swift" as "MainViewController.swift". Perhaps this is a warning to the user to insure everything is defined as you expect it to be.
I experienced this issue again and backtracked, eventually clearing the storyboard and then deleting it entirely from the project and the issue was still present. Relaunching Xcode fixed the issue.
Upvotes: 4
Reputation: 63
For me I just had a view controller that wasn't attached to anything, i.e. I had a UITabBar Controller, and a few View Controllers attached to the TabBar, but there was one View Controller that was stranded, with out any connection to another view.
From my experience, the error message was,
“View Controller“ is unreachable because it has no entry points, and no identifier for runtime access via -[UIStoryboard instantiateViewControllerWithIdentifier:].
The View controller name was the text in quotes, i.e. “View Controller“.
Hope this helped someone!
Upvotes: 3
Reputation: 2318
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 :-)
Upvotes: 14
Reputation: 12023
Set Your TableViewController an Initial View Controller from the Storyboard
Upvotes: 7