When I do web development, I use a custom made logger that catches fatal errors and appends a trace to a file and displays a message to the user. I can occasionally glance to see if the file changed, which means, some user encountered an error and I can dig in to see what they encountered.
I'd like something similar on the iphone, with some caveats:
- While developing, it should be trivial to reset the list of errors or turn off notification.
- While developing, the error messages should also show up in some obvious place, like on the screen on in the console
- Once deployed, errors should politely be sent to the mothership for analysis (for a bug fix in the next update)
- Turn on Trace/Info logging when trying to track down a problem during development
- Turn off console logging for 'Release' to speed up things for the user
- Should clean-up after itself so as to be a good citizen on the phone
Some Related Links
- Using GSLog for instead of NSLog
- logging to a file on the iphone
- On the Mac, people say Apple System Logger and GTM Logger are the way to go objective-c logging best practices
- Jeff A's Blog entry on logging
It seem like there would be a common toolkit to do this - how do you handle this?
[Update Oct 2011] There have been some developments, of varying maturity...
- PLCrashReporter.
- Quincy sits on top of PLC.
- Bugsense commercial crash reporter.
- Crittercism crash and error reporting (some free packages, some paid).
- Test flight now has an SDK that catches crashes (but not yet for app store apps, just dev apps).
- Like Test Flight, Hockey aims to combine ad hoc distribution with crash reporting.