0
votes

I am very new to this and hope I am at the right tread asking the right question.

My app has been in the AppStore for a couple of weeks now and always only worked on iPhone. it was rejected because the App does not run on an iPad. The exact reason it was rejected was:

Reasons for Rejection: 2.10: iPhone apps must also run on iPad without modification, at iPhone resolution, and at 2X iPhone 3GS resolution

When run on iPad 5 simulator, the following error occurs:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '* -[__NSArrayM insertObject:atIndex:]: object cannot be nil' * First throw call stack: (0x1ba5022 0xf60cd6 0x1b9233e 0x1b931f0 0x18bc04 0x19724f 0x3c3c 0x18a99b 0x418e 0xfd9d4 0xfdbe0 0x4155 0x15159 0x1433f 0x3b18 0x2b0d 0xc1386 0xc2274 0xd1183 0xd1c38 0xc5634 0x14d0ef5 0x1b79195 0x1addff2 0x1adc8da 0x1adbd84 0x1adbc9b 0xc1c65 0xc3626 0x2a60 0x29c5)

terminate called throwing an exception

What do I need to do in Xcode 4.5.1 to make my app run on an iPad?

2
please post the rest of the stack trace.madmik3
It looks like you are trying to insert a null object into a NSMutableArray. Have you tried debugging into your code? If you are not sure where to start, you could trying setting breakpoints at all you inserts and adds to NSMutableArrays and then stepping through each of them.Jay Haase
thank you, Sirs, I have added stack trace, your help is greatly appreciated. I am hopeless on why it runs OK on iphone but not iPad simulator?user1703590

2 Answers

0
votes

Do not insert a nil into an array. If you want to express that there is an "empty" object, use the singleton NSNull: [myArray insertObject: [NSNull null] atIndex: myIndex];.

* EDIT *

In case you did not use such code by intention, you should seek for automatic platform-dependent code. Hot candidates are missing or misconnected outlets or actions, platform-specific bundles, or missing or wrong (i.e. with incorrect IDs) elements in NIB/storyboard. However, without seeing your code, everything is guessing. Try to detect the fault by identifying the last place in the code trace, that belongs to your code (not library/framework code).

0
votes

For Cordova developers, you will get this error if you supply anything in the "Main Interface" dropdown in the General Project Settings. Always leave this blank if you want to target all platforms with a Cordova app.

You can also click all four orientations if you like. Also make sure "Universal" is selected in the devices dropdown.