-2

This happens also on a blank Master/Detail project when using XCode 6.2 beta.

In other words: it works on the simulator but gives me the error below when I run it on an iPhone 5 with iOS 7.1 installed (I don't have any other device to test it on).

Below is what I get adding the exception breakpoint.

enter image description here

I found the following previous Q/A but it does not seem to happen in the same case as mine. Why would it work on the simulator?

Is this an XCode 6.2 bug? Can anyone reproduce it?

Community
  • 1
  • 1
mm24
  • 8,150
  • 11
  • 65
  • 159
  • Include the call stack and someone will be able to describe how you can figure out which line triggers it. – Ian MacDonald Feb 13 '15 at 18:31
  • 1
    `topViewController` is a method of `UINavigationController`. Obviously your `MasterViewController` isn't a navigation controller. – rmaddy Feb 13 '15 at 18:33
  • To learn to debug, see: http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1 – rmaddy Feb 13 '15 at 18:34
  • I remember that the simulator is rather good-natured about this errors. – ott-- Feb 13 '15 at 18:36
  • I added the full stack.. however I am unable to understand which class and line of code is triggering this exception as I can't see more info other than the above and the image I added – mm24 Feb 13 '15 at 18:38
  • Add an `Exception Breakpoint` for `Objective-C` (link: https://developer.apple.com/library/ios/recipes/xcode_help-breakpoint_navigator/articles/adding_an_exception_breakpoint.html)and then post the code where your app crashes. – Robotic Cat Feb 13 '15 at 18:44
  • @RoboticCat excellent.. done.. see edit – mm24 Feb 13 '15 at 18:50

2 Answers2

2

The crash is because you are trying to use a UISplitViewController on an iPhone with iOS 7. UISplitViewController was only available on the iPhone from iOS 8+. Prior to iOS 8, UISplitViewController was only available in the iPad.

Robotic Cat
  • 5,861
  • 4
  • 39
  • 57
0

An important difference between the simulator and a device is that the simulator isn't case-sensitive when loading resources. Devices are. So it's possible a nib or other resource loads fine on the simulator but isn't found on the device because of a capitalization typo.

Dave Batton
  • 8,226
  • 1
  • 43
  • 48
  • the weird thing is that this is on a blank project.. do u have XCode 6.2? Can u try running a blank master/detail test project on a real device? I got an iPhone 4 with iOS 7.1 – mm24 Feb 13 '15 at 18:53