ShareKit/ShareKit — pull request #213 by VilemKurz (2012-02-01 16:51:56+00:00)
Title: When the user revokes app permission or changes password. Fixed and simplified throughout ShareKit

The behavior when user has credentials in shareKit, revokes permissions or the service (or changes password) was wildly different, on some sharers very buggy and full of unnecessary alerts. The code was full of TODO: better error handling etc. On some sharers user was trapped in circle and the only possibility was logout (to delete credentials from SHK).

Now it is on most* sharers fluid: if SHK detects invalid credentials during workflow, it silently presents login UI. After successful login the item is directly sent to service, or the user is presented with edit form. This depends on where during the workflow the user was. No more UIAlerts!

However, if the user enters invalid credentials in login window, the user is notified and can enter credentials again, or cancel.

Some more info:

- improved SHKSharer, so that it is easier for new service implementers to handle this situation. More common functionality moved to basement, to make sharers lighter.
- fixed some minor bugs, see commit messages
- as a side effect I did initial flowchart of ShareKit workflow. More info tomorrow.
- credentials for various services in demo app are complete now.
- added helper xmlparser, to ease error handling with services who use xml responses

* on some sharers I intentionally left original behavior (SHKPinboard, SHKFoursquare). SHKVKontakte does not have error handling at all, so no change too.