-1

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

What should i do for this error?

legolas
  • 725
  • 1
  • 5
  • 7

4 Answers4

1

Select the ViewController in your Storyboard which is not accessible and add a Storyboard IDenter image description here

LoVo
  • 1,856
  • 19
  • 21
  • there is no scene error after i did what you said , but now there is a "Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set? " error. – legolas Mar 04 '15 at 17:53
0

That's only a warning. If you use that scene ignore the warning, otherwise delete this scene, because nobody needs it.

idmean
  • 14,540
  • 9
  • 54
  • 83
  • there is no scene error after i did what you said , but now there is a "Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set? " error. – – legolas Mar 04 '15 at 17:54
0

This occurs when a View Controller/Scene does not have a segue to it and neither there is a identifier defined for the ViewController/Scene.

So basically XCode is complaining that though you have created a Scene, you can not use it in any possible way.

So depending on your need:

1) You may need to define a segue to it(may be with an identifier)

OR

2) Define Stoaryboard ID to it. By selecting scene -> Right Pane -> Identity Inspector(3rd Icon) -> Stoaryboard ID

OR

Ignore it for now.

Taha Samad
  • 1,135
  • 1
  • 9
  • 22
  • there is no scene error after i did what you said , but now there is a "Failed to instantiate the default view controller for UIMainStoryboardFile 'Main' - perhaps the designated entry point is not set? " error. – – legolas Mar 04 '15 at 17:54
  • http://stackoverflow.com/questions/20875823/ios-7-failing-to-instantiate-default-view-controller This might help. – Taha Samad Mar 05 '15 at 07:24
0

Make sure you do like this one.

let storyBoard : UIStoryboard = UIStoryboard(name: "Main", bundle:nil)
        let viewController = storyBoard.instantiateViewControllerWithIdentifier("firstView") as ViewController
        self.presentViewController(viewController, animated:true, completion:nil)

enter image description here

Nurdin
  • 23,382
  • 43
  • 130
  • 308