0

I have created a universal app that is landscape only using Xcode 7.2 (Landscape left, Landscape right and Require full screen is checked). When I run the application on the iPad simulator, it is showing portrait only. When I tried to change the orientation to landscape it crashes.

"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSNull length]: unrecognized selector sent to instance 0x101c2daf0'"

Hamish
  • 78,605
  • 19
  • 187
  • 280
  • Please see http://www.raywenderlich.com/10209/my-app-crashed-now-what-part-1 to learn how to debug a crash like this. – rmaddy Jan 26 '16 at 21:57

1 Answers1

0

Without seeing your code, it's tough to tell exactly. My guess is somewhere you are trying to get the length of what you think is an NSString but it's actually NSNull. From my experience, this would be most likely to occur in some sort of network parsing.

AdamPro13
  • 7,232
  • 2
  • 30
  • 28
  • This is really more of a comment than an answer since the OP doesn't provide any relevant details to say for sure. Obviously the exception indicates that an `NSNull` is being used where an `NSString` is expected. But that doesn't solve anything. – rmaddy Jan 26 '16 at 22:03
  • Actually there is not code that application should crash.Before running application if simulator orientation is landscape.it is working fine.but when i Quit simulator and then start it again.then it is portrait only.When i am trying to change orientation to landscape then it is crashing.Even when press only command it is crashing. – Salman Khan Jan 26 '16 at 22:12