简体   繁体   中英

How should I notify myself (the developer) when things go wrong?

I would like to be alert when things go wrong in my application. For example, let's say that one of my class was suppose to copy a file from my application bundle to the cache directory but didn't do it for some reason, I would like to be made aware of it.

In a web application, I would simply create a report on disk then send an alert email. However I can't do that on the iPhone, so my question is, what is the best way to notify myself (the developer) when things go wrong?

使用HockeyAppTestFlight或创建自己的崩溃报告器...

Are you thinking of using this in a production environment? If so, I would go with basviks suggestion and create your own crash/log reporter to pass some json data over http or the equivalent when connected to wi-fi.

The important thing is of course is that if you intend to collect diagnostic data from the users, even if it is anonymised, you should always ask for the users permission, or at least notify them that the data is collected.

I'm also curious on Apples stand on this. They can be pretty strict on what data you are allowed to gather from the user, so I would clearly state what you are collecting and what you intend to do with the data when you submit the app.

Don't create your own crash reporter. There are services for automatic crash reporting out there you should use. I've been using Crittercism and it's awesome. It works for both beta testing and production.

I think that best way to check your code deeply is to print on the console everything you need, and you can do that. I do that independently from any programming language that I use

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