1
votes

I recently copied everything in my iPhone storyboard over to an iPad storyboard and changed nothing. It runs perfectly on the iPhone, loading WelcomeViewController as the initial scene.

However, when I run it on the iPad, the program crashes because it tries to load MainViewController as the initial scene.

I checked on Interface Builder, and the initial scene is set to view controller WelcomeViewController. I went in the debugger and put a breakpoint in the ViewDidLoad method of WelcomeViewController, and the iPad never hits that breakpoint but the iPhone does.

This is the Identity Inspector for the view controller of my initial scene.

WelcomeViewController

This is the Attributes Inspector for the view controller of my initial scene (same as above).

WelcomeViewController

Why does the iPad insist on trying to load ViewController as the initial view controller?

Thanks

EDIT: When I go to Targets > iPad Deployment Info, and set the main storyboard to the MainStoryboard_iPhone instead of MainStoryboard_iPad everything works. For some reason this MainStoryboard_iPad, a literal clone of the iPhone storyboard, doesn't.

1
are you sure your appdelegate methods do not have any custom view controller pushing code? Also do you use navigation controller? If yes, what is it's root view controller in case of iPad?Nirav Bhatt

1 Answers

0
votes
  1. Make sure your iPad view has initial controller set to WelcomeViewController in the storyboard. It is represented by an arrow as given below.

enter image description here

  1. Next make sure your iPad Deployment section in target refers to your iPad storyboard. enter image description here