James
James

Reputation: 2999

App works on iphone simulator,iphone device, ipad simulator but not ipad device

So I made an app, And it runs on all possible platforms except the ipad device. I would understand if it ran on the ipad device and not the iphone device since the processor is better on the ipad, but this has me stumped. It also worked fine on the ipad simulator. Can anyone think of a reason why this could be?

Upvotes: 1

Views: 2045

Answers (4)

James
James

Reputation: 2999

Ok gents, sorry but I did not provide enough information for any of you to correctly answer this, but! here was my problem.

I had a login screen with 2 textfields, and a submit button. The submit button would release the current view and add a new view. I would usually press submit while the keyboard is being shown. Aparantly this makes everything blow up. You must manually hide the keyboard first. Hopefully this saves somebody some time.

Upvotes: 0

You say different xibs... you might be missing an Outlet connection somewhere.

Upvotes: 0

viggio24
viggio24

Reputation: 12366

There are too few details to give an explanation. A possibility is: when you run the app in two different devices, iPhone and iPad, some nib files could be different. Even the app delegate is different if you use XCode templates for universal apps. So this means that it is possible that the code executed is different in the two devices.

So imagine that in the iPad app delegate / view controller you're allocating - at launch - a lot of memory (scroll view with many large images for example). Then the app will not crash in the simulator (it uses your Mac memory). The app will not crash in the iPhone (different code). So at the end it will crash in the iPad only.

Other possibilities: you're going short in memory very soon. But the iPad 1 has less memory than iPhone 4G.

Other possibility: the watchdog timer kills your app at launch. It happens on the iPad 1 only because you're loading a few large images and it takes a lot of time, just enough to be killed by the watchdog.

Other possibility: iPad 1 is still with iOS 3.2, while iPhone and simulator are linked to iOS 4.0. In this case it is easy to have the app crashing in iPad 1 by calling one of the many new APIs introduced with iOS 4.

As you can see there are many possible explanations...

Upvotes: 2

add target for device or convert it to universal application

Yes, it's easy to target both platforms. If you login to ADC and read the Programming Guide, it'll provide the basics for specific development. I can't legally speak of the "how."

Um. If you follow their directions, build two targets, share your source within the same project... then you'll be set. It's the same SDK, just different Nibs & main(), from what I can tell.

Upvotes: 0

Related Questions