While searching for a way to find out what caused my application to crash, i came across this link. Using this, I can use printf statements to write into a log file on the phone, and find out exactly where the code fails. Lets assume that are application looks like this: SampleDB.app | |_ Info.plist | |_ Icon.png | |_ Default.png | |_SampleDB First Rename the SampleDB to something else: Code: mv SampleDB SampleDBMain Now create a new file, with the original app's name(SampleDB) and add the following code: Code: exec "$(dirname "$0")"/SampleDBMain &> /tmp/myapp.log Expect for the application name, everything should be same as provided. Place this file in the .app folder. Now your application should look like this: SampleDB.app | |_ Info.plist | |_ Icon.png | |_ Default.png | |_SampleDB ---> This is the shell script we created | |_SampleDBMain ---> This is the original file. Keep in mind that the ldid command should be run on the renamed file (SampleDBMain) and not the newly created shell script. After ldid, respring/reboot your device and launch your app from the springboard. After you are done or the application crashes, retrieve the log file myapp.log from /tmp directory on the phone. You can add printf() statements anywhere in your code, and they will appear in this log. This is great for logging messages for those who are not using XCode or are developing on Windows/Linux using the toolchain. Enjoy!!!