How to determine, upon launch, whether the app crashed the last time it quit?

Posted by enchilada on Stack Overflow See other posts from Stack Overflow or by enchilada
Published on 2010-03-13T23:17:32Z Indexed on 2010/03/13 23:25 UTC
Read the original article Hit count: 178

Filed under:
|
|

One of the crash reporter frameworks I've found does it like this: If there exist crash reports in the ~/Library/Logs/CrashReporter folder for the app, it determines that a crash occurred before. Then it allows the user to send the developer the crash log. And the finally, it deletes those logs.

It is this deletion that is bothering me. It's not acceptable to me. Maybe the user wants to look at those logs later. It is simply rude to the user to just delete his crash logs.

So I'm looking for a better way to determine the crash.

It doesn't really work to store the last read crash logs in the user defaults or the user data, because that would mean that if the user deletes the data and defaults (which he has a right to do whenever he or she wishes), and then launches the app, it will be detected as crashed the last time it was quit. So this doesn't work.

Any ideas?

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about mac