Debugging iOS application: crash under Xcode but keep working on iPhone

This means that your app is using lot of memory and due to this the app is killed. Check for memory leakages.


Your app is most likely being terminated due to low memory. The best thing is to look at the device console using Xcode's Organizer:

If iOS is running out of memory and killing your app, you should see something like this:

The app "myapp" on "iPhone_device" quit unexpectedly.
Message from debugger: Terminated due to signal 9

You should use the Activity Monitor in Instruments to see how much memory your application is using.

You can also use the Memory Monitor instrument and enable graphing of "Physical Memory Free". If you see the graph approaching 0 before your crash you can be pretty sure it's a memory issue.

enter image description here