5 Replies Latest reply: Dec 11, 2012 12:09 AM by ravikumar.y
MarmotaSB Level 1 Level 1 (20 points)

Hello everybody, I´m just learning IOS Programming and I´ve had a problem when i Run the apps on my iPad (6.0) and mi iPhone (5.0.1) and also in the Simulator, when I run some apps in certain devices the screen is block in the Default image and i get this line in green:

 

return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); Thread 1:signal SIGABRT

 


I´m getting mad trying to solve this, help would be appreciated. In the debugger this time i have this:

 

2012-11-18 13:59:50.430 Quiz[82846:707] *** Terminating app due to uncaught exception 'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named NSLayoutConstraint'

*** First throw call stack:

(0x33efa8bf 0x3414a1e5 0x33efa7b9 0x33efa7db 0x375863a1 0x3758650f 0x37586277 0x375173fd 0x374879cb 0x37366ea1 0x372dc78b 0x372daf9d 0x372cd941 0x3733f541 0x23b1 0x372db7eb 0x372d53bd 0x372a3921 0x372a33bf 0x372a2d2d 0x306d5df3 0x33ece553 0x33ece4f5 0x33ecd343 0x33e504dd 0x33e503a5 0x372d4457 0x372d1743 0x210f 0x20b0)

terminate called throwing an exception(lldb)

 

Thanks for your help.

  • disguise Level 2 Level 2 (355 points)

    When you built your app - are there any warnings?

  • MarmotaSB Level 1 Level 1 (20 points)

    Nope, the app builds allright without issues and warnings, I´ve tried and in my iPad works perfect, it could be a problem of the compatibility with my iPhone´s OS version and the IOS 6 SDK?

     

    Thanks for your answer

  • Mark Szymczyk Level 4 Level 4 (1,915 points)

    Your app is using auto layout, which was introduced in iOS 6. Your iPhone is running iOS 5, which doesn't support auto layout. That's why the code works on your iPad, but not your iPhone.

     

    If you want your app to work on both devices you have to turn off layout and set your app's deployment target to iOS 5. To turn off auto layout, select your xib file from the project navigator. Open the file inspector by choosing View > Utilities > Show File Inspector. Deselect the Use Auto Layout checkbox.

     

    To change the deployment target, select your project from the project navigator to open the project editor. Select your project from the left side of the project editor. Click the Info button at the top of the editor. Choose iOS 5.0 from the iOS Deployment Target combo box.

  • MarmotaSB Level 1 Level 1 (20 points)

    Thank you so much, now it works perfect.

  • ravikumar.y Level 1 Level 1 (0 points)

    cool