简体   繁体   中英

When debugging with XCode, app works fine, when running it on device or simulator, app crashes

My application crashes when freely running it on a real device or in the simulator. When I'm running it with XCode attached, the app works fine.

The app doesn't give me any errors and since I'm not running it with XCode attached, there is no message sent to the logger.

Any idea of what could be wrong or how I could find out what causes this crash?

Thanks!

If you just want to test in a device why don't you try through iTunes. Find the Target of your project in the Finder, then drag it to iTunes. You can then sync the applications. This is not a solution but an alternative to run the app on your device.

Thanks Aditya,

The crash logs in the Organizer are actually very well detailed and they even include the line of code in the implementation file where the app crashed. When going to that line of code it seemed that I was CFRelease -ing a ABRecordRef, which is an integer of some kind...therefore I shouldn't release it

The weird thing is that it didn't crash or complain while debugging, but when running it on the device it did.

You can read about CFRelease in detail in the following thread

Cheers

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM