31

I have an iOS project with a storyboard. I recently upgraded to Xcode 4.3.1, and now this new warning appears:

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

The problem is that I have some Navigation Controllers in the storyboard with no entry points to them. The reason I have them is so that I can embed other views in them to see the nav bar at design time in Xcode. The actual navigation controller these views are pushed onto at runtime are not in the storyboard (old code that hasn't been ported to the storyboard yet).

Has anyone found a nice workaround for this? I would like to keep my code clean without warnings.

1
  • 1
    If you want it simply to see what a navigation bar looks like with your UI, you can set the Simulated Top Bar to "Navigation Bar" on your scene. It will cause a navigation bar to be displayed with in the scene (and will even automatically propagate down any push segues). Commented Mar 23, 2012 at 16:52

7 Answers 7

68

You can just set an identifier. In Xcode >5 on the identity inspector on the right pane, you'll find a field called "Storyboard ID". Put any string in there, and Xcode will be happy again.

It just wants to know you could reach it (via that identifier) if you wanted to.

7
  • where is the "Identifier" section? i can't seem to find it
    – nfoggia
    Commented Jul 18, 2012 at 5:12
  • Select the view controller, then the "Utilities" pane which is on the far left. It has several tabs, the 4th from the left is "Attributes". That tab has "Simulated Metrics" and "View Controller" sections. The "Identifier" is in the View Controller section.
    – danh
    Commented Jul 18, 2012 at 14:46
  • @danh I can't find any "Identifier" in View Controller section. ( My Xcode version is 4.6)
    – hs3180
    Commented Mar 25, 2013 at 7:26
  • Its "Storyboard ID" in 4.6.
    – danh
    Commented Mar 25, 2013 at 14:35
  • In Xcode 5.1 it is under 'Identity Inspector' tab instead of 'Attributes' and its name is "Storyboard ID'. Commented Mar 23, 2014 at 16:40
16

In newer versions of Xcode: Just set a title in Title in the Attributes Inspector and then set an identifier in the Storyboard ID in the Identity Inspector of your controller.

10

You may have accidentally copied and pasted a view controller on top of the real one.

Try dragging the offending view to see if there's anything underneath.

3
  • 1
    I have no idea why this is at 0 points, this exactly was my problem! I was trying to copy/paste a view controller and i thought it wasn't doing it , but it was just placing it exactly over the old one. Thanks!
    – mgrandi
    Commented Feb 9, 2013 at 1:52
  • Oh god, why?..) I've cloned it twice! Thanks for clue
    – heximal
    Commented May 29, 2013 at 12:15
  • Made this mistake too. I'll remember this one!
    – cheznead
    Commented Jun 29, 2015 at 10:15
1

You can click on the navigation controller and under the attributes inspector click the button "is initial view controller", this should work too

1

In Xcode 6 - you might be getting this error if you have a new view controller that is standing by itself. You might have created it and did not use a segue to connect the screen.

1

You need to set an identifier for each ViewController (including navigation controller) in "Storyboard ID" field of "Identity Inspector" pane.

In the "Attribute Inspector" pane scroll down to the "View Controller" section and if the "is Initial View Controller" is not checked, check this.

Now run the app.

0

Title: Setting "is Initial View Controller" (Using Xcode 6.1)

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

Just installed Xcode and first time user, so apologize in advance if explanations are lacking appropriate terminology.

Resolution: In my case, the "is Initial View Controller" check box was not checked

"is Initial View Controller" property can be found on the far right pane of the default Xcode window or is under --> View --> Utilities --> Show Attribute Inspector

If you don't see any properties set in the "Attribute Inspector", select the "View Controller" in the story board area. The little round button with a square in the middle (or the first button on the left)

When you select the "View Controller" you should see that the "Attribute Inspector" box is now populated with various property settings.

In the "Attribute Inspector" pane scroll down to the "View Controller" section and if the "is Initial View Controller" is not checked, check this.

Now Run the project. Hope this helps and works.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.