0

I have another question about Xcode. I am really new to this stuff, so please bear with me. My segues are working fine in the simulator but I have a warning with the yellow triangle exclamation point sign next to it that says:

    file:///Users/gavlabfhwa3/Desktop/BlindPed/BlindPed/Base.lproj/Main_iPhone.storyboard: 
warning: Unsupported Configuration: Segues initiated directly from view controllers must 
have an identifier for use with -[UIViewController performSegueWithIdentifier:sender:]

How important is it that I fix things like this? Is it going to affect my actual app? How would I fix this?

Thanks in advance. My code is posted in the last question I asked and, if necessary, I can repost it or post this question in answer to my other question. My code doesn't have anything in it about a segue, I am doing all the segues with storyboard.

-Jeff-

Pancho
  • 4,099
  • 1
  • 21
  • 32
user3712524
  • 101
  • 3
  • 11

2 Answers2

4

OK this is something you should need to set in Interface Builder. Open up the story board and find the lines between your scenes. Click on the one you suspect to cause the error:

enter image description here

On the attributes inspector you should specify a string like I did ("toSection") that makes sense to your application. Storyboard segues without Identifier will work fine if you link them directly from IB but not when you programmatically try to call them.

I would really like to stress the fact that your app should be as warning free as possible and you fix them as soon as they appear. Lots of warnings will bite you sooner or later.

Lucas van Dongen
  • 9,328
  • 7
  • 39
  • 60
1

If your segue doesn't have an identifier it won't hurt anything, but it's not going to be able to be used. Adding a segue from a ViewController allows it to be called from:

[self performSegueWithIdentifier:(NSString *) sender:(id)]

You do this so that you can programmatically call the segue instead of it being attached to a button or something.

Uxonith
  • 1,602
  • 1
  • 13
  • 16
  • But what if each of the storyboard segues have identifiers and you're still getting that error? – Agustin Jul 29 '16 at 14:46
  • If you are still seeing the errors do a clean build of your project. Or quit Xcode delete your derived data folder and then build again. https://stackoverflow.com/questions/38016143/how-to-delete-derived-data-in-xcode-8 – xdeleon Jul 07 '17 at 11:56