views:

41

answers:

2

Hello, I'm testing my app on an iPhone 4 and iPhone 3GS. It works perfectly on the simulator and the iphone 4 but crashes after several mins of use on the jailbroken 3gs.

On the iphone 3gs, the only apps i've installed are TetherMe and SBSettings.

Can i just assume that the app crashes due to the phone being jailbroken?

+3  A: 

No. You cannot assume that an app tested on one device will run on all others.

Your app will have very different amounts of memory available on different devices (and under different OS versions, and with different amounts of background processes running).

hotpaw2
For instance, an iPhone 4 has twice the RAM of a 3GS. etc.
hotpaw2
Does the simulator simulate ram differences? I always use the 3gs simulator, because the iphone 4 simulator is ginormous lol.
ssj
@ssj: I don't think it does simulate RAM difference. However, you can simulate "running out of memory notifications" and see if you application is freeing things up. But would recommend you debug your application and see where the problem is before you start trying to fix some theoretical bugs.
Vlad Lazarenko
The simulator has available to it, however much physical memory + virtual memory your computer has available to it. Sim is ok for quick testing, but when you have to start debugging things, best to avoid the Sim.
jer
The Simulator is no good for testing either memory or performance problems. A real device might be over 10X slower and allow an app over 100X less memory than the Simulator (any). Any memory corruption may behave completely differently.
hotpaw2
+1  A: 

The application developed for one version of iOS might not work in another. This is true not only for iOS and iPhone, but for any other application and operating system and/or its version. The difference might me in memory consumption, different API behavior, ABI incompatibility or something else. However, you cannot just assume it is due to jailbreaking. To get the answer as for the crash, you have to run application under the debugger, if possible. Otherwise try to debug it using print statements, for example.

Hope it helps.

Vlad Lazarenko
Better than printf statements, are crash logs he can get off the device using the organizer. Also, I have seen apps crash under certain conditions on jailbroken devices, and in fact, I have engineered apps to do just that under certain jailbroken devices (i.e., ones who are running the app pirated—Nothing a null dereference won't fix).
jer