Jump to content

Welcome! You're currently a Guest.

If you'd like to join in the Discussion, or access additional features in our forums, please sign in with your Evernote Account here. Have an Evernote Account but forgot your password? Reset it! Don't have an account yet? Create One! You'll need to set your Display Name before your first post.

Photo

Fix for missing handling of failed NSURLConnection in iOS SDK

ios sdk nsurlconnection internet connection session oauth

  • Please log in to reply
1 reply to this topic

#1 martinb

martinb

  • Pip
  • Title: Member
  • Group: Members
  • 3 posts

Posted 30 April 2012 - 07:48 PM

Hi all,

today I realized that the EvernoteSession model in the iOS SDK doesn't handle failed NSURLConnection instances. For example when one tries to submit an authentication request without any internet connection this would be a nice feature.

Simply extend the implementations of the NSURLConnectionDelegate protocol in the EvernoteSession.m file with the following lines.

- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error
{
	self.completionHandler(error);
}

The completion handler than might be subject to further adjustments for this special case (see http://stackoverflow...6689538/1068052).

:)

#2 Matt McGlincy

Matt McGlincy

  • Pip
  • Title: Member
  • Group: Members
  • 4 posts

Posted 07 May 2012 - 04:23 AM

hey Martin -

Just wanted to post as a followup: the iOS SDK on github has been updated to handle the connection:didFailWithError: method.

cheers,
-matt





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Clip to Evernote