arachide
arachide

Reputation: 8076

How to debug ad hoc version?

I have an app, it worked well on simulator, but the ad hoc version always crashed when started on my ipod. Is it possible to debug ad hoc version or its there any replacement solution?

Thanks

interdev

Upvotes: 1

Views: 899

Answers (3)

h4xxr
h4xxr

Reputation: 11475

The suggestions from others to run on debug to find out what the problem is, is good. Beyond this, there are many reasons why apps work on the simulator but not a real device. My top three reasons are:

  • Case sensitivity. Mac OS 10.x is not case sensitive. iOS is. If you're referencing any files/graphics etc in your project and you have the case wrong, it will work fine on the simulator but die horribly on your device!
  • Read/write bundle files. On the simulator, you can edit bundle files within your code. On the device, you can't. If your code depends on you being able to do so, again it will work great on the simulator but not the device!
  • Memory. If there are big memory leaks everywhere your simulator will probably crash as well as your iPhone. But if you're just using lots of memory - perhaps loading in loads of image files into an NSArray - this will work just great in the simulator, but will die a horrible death on the device!

In summary, remember it's a simulator, not an emulator!

Upvotes: 0

Sam Ritchie
Sam Ritchie

Reputation: 11038

Interdev, try running the debug version on your device; from your description, it seems like there may be some difference between simulator and device, rather than the ad hoc and debug versions.

If that doesn't give you the answer, and it is actually some issue with the ad hoc version, you can always access the crash logs for the device from the Xcode Organizer (Window > Organizer). Good luck!

Upvotes: 1

WrightsCS
WrightsCS

Reputation: 50727

instead of building for Ad-Hoc, keep it in DEBUG mode when ran on your device, then try RUN > DEBUG - Breakpoints On

Upvotes: 0

Related Questions