Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Could not instantiate class named UIStoryboardShowSegueTemplate" - how can I make a Storyboard happy with iOS 7 and iOS 8?

I created a project in Xcode6, beta 6 or so (upgraded to b7 today). Using Swift, been developing for the iOS 8 SDK, etc.

The Storyboard, so far, has two View Controllers, and a segue between the two set up as "Show" (it's not triggered by a button directly, it's handled by a successful login)

enter image description here

Everything is groovy. And then I tried running the app on the iOS 7.1 simulator. It dies on the first screen with this message:

*** Terminating app due to uncaught exception 
'NSInvalidUnarchiveOperationException', 
reason: 'Could not instantiate class named 
UIStoryboardShowSegueTemplate'

Well, seeing as how "Show" is listed as an "Adaptive Segue", and Adaptive UI is pretty much an iOS 8 concept, it makes sense that iOS 7 would have an issue with it.

Since they've gone so far as to basically say "look, this is what we used to call Push", I figure I'll change the Segue to "Push". Sure, it's deprecated, but I'll just ditch it when iOS 8 takes over.

Except that if I use it I get a warning

enter image description here

Well crap, I don't want to see some annoying warning, but I'm not sure I want to give up iOS 7 compatibility yet (though it's not out of the question). And this isn't in code so I can't suppress the warning (or I don't know how).

How can I make a Storyboard Segue that's happy in both iOS 7 and 8 in Xcode 6?

like image 418
Tom Kidd Avatar asked Sep 02 '14 23:09

Tom Kidd


2 Answers

You can still use the new Segue type (such as Show) for iOS 7. Make sure in your Storyboard interface builder document, set the "Builds for" to iOS 7 rather than iOS8. (Sorry the screenshot is prepared but I have no enough reputation to post it)

Inside the File Inspector select the lowest: enter image description here

like image 127
bubuxu Avatar answered Nov 12 '22 13:11

bubuxu


As i am also getting the same issue with my project. I get this resolved by rechecking all segues i defined in the app. Make sure all segues will have some action like push/pop/modal.

If not then on that controller app will crash. Please check below snapshot which you will find in your storyboard.

your storyboard image will look like first image.

enter image description here

Make cure segue is selected.

enter image description here

like image 40
Anil.khanna89 Avatar answered Nov 12 '22 13:11

Anil.khanna89