Перейти к содержимому

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.

Фотография

Fix for missing handling of failed NSURLConnection in iOS SDK

ios sdk nsurlconnection internet connection session oauth

  • Please log in to reply
В теме одно сообщение

#1 martinb

martinb

  • Pip
  • Title: Member
  • Group: Members
  • 3 сообщений

Отправлено 30 Апрель 2012 - 07:48

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 сообщений

Отправлено 07 Май 2012 - 04:23

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





Also tagged with one or more of these keywords: ios sdk, nsurlconnection, internet, connection, session, oauth

Количество пользователей, читающих эту тему: 1

0 пользователей, 1 гостей, 0 анононимных

Clip to Evernote