How to handle Core Data retention issues for users on iPhone?

So, I have a main application for storing, searching and processing data. Basic CRUD operations. In different places in my code where I store or update this data, I basically have this:

NSError *error; if (![self.managedObjectContext save:&error]) { // TODO: Handle this error NSLog(@"Error while saving data %@, %@", error, [error userInfo]); } 

What do most people do, from the user's point of view, when such things happen?

The only thing that comes to mind is simply to release a terrible UIAlertView with an indefinite message that something went wrong; not quite sure how to recover these things.

For the argument, let's assume that my model has almost no validations, so the only errors that can occur would either be something terrible or a programming problem.

Any good ideas for working with users?

+7
user-interface iphone core-data user-experience
source share
3 answers

Jacob Nielsen has a few brief recommendations that you might want to check out; of all that it offers, one that I highly recommend that you indicate in the error message that this is not a user error. From my own experience with user testing, most users think that they did something wrong when an error occurs, and this leads to frustration.

Maybe something like:

Failed to save the problem: don't worry, it's not your fault! If you restart the application, try again. But please contact [contact with the developer] and tell him that the error was [short, unforgettable error code]

+5
source share

In this case, I think it would be best to present a warning to the user and exit the application.

0
source share

Short answer: I have never had a save error in production. I usually make these statements and make them crash the application. This is to ensure that I catch them during development.

If your application is well written, you should not have one of them when the user launches the application.

As for the text, it depends on your application, and there is no general rule for them.

0
source share

All Articles