Evernote / evernote-sdk-ios

Evernote SDK for iOS
Other
398 stars 130 forks source link

need a way to know if a login was canceled or there was an error #60

Closed udibr closed 11 years ago

udibr commented 11 years ago

currently I will always get EvernoteSDKErrorCode_TRANSPORT_ERROR=-3000 even if there was no error and the user just pressed the Cancel (top left) or the de-authorize buttons

If a token has expired, and I have messages waiting to be sent, I need to call the login if there is a networking error I need to wait and try again latter but if the user decides at this point to de-authorize the App, I need to delete all the pending messages

mustafa commented 11 years ago

You can use the isTokenExpiredWithError in EvernoteSession to check for expired tokens

udibr commented 11 years ago

I am using this API (isTokenExpiredWithError) and this is how I decide to request the user to perform a new login. But my question was different, please read again my original question.

Thank you, Udi