Skip to content

Instantly share code, notes, and snippets.

@sonsongithub
Created November 24, 2012 06:51
Show Gist options
  • Select an option

  • Save sonsongithub/4138703 to your computer and use it in GitHub Desktop.

Select an option

Save sonsongithub/4138703 to your computer and use it in GitHub Desktop.
Patch for evernote-sdk-ios(327a961b1ef40a65fb4fb699ae8da7bfefda6369)
Only in .: evernote-sdk-ios-Prefix.pch
diff -r ./internal/ENOAuthViewController.m /Users/sonson/code/Core2ch/ios/3tch/Framework/Library/Evernote/internal/ENOAuthViewController.m
170,171c170,172
< if ([[request.URL absoluteString] hasPrefix:self.oauthCallbackPrefix]) {
< // this is our OAuth callback prefix, so let the delegate handle it
---
> NSRange r = [[request.URL absoluteString] rangeOfString:self.oauthCallbackPrefix];
> if (r.location != NSNotFound) {
> NSString *responseURLString = [[request.URL absoluteString] substringWithRange:NSMakeRange(r.location, [request.URL absoluteString].length - r.location)];
173c174
< [self.delegate oauthViewController:self receivedOAuthCallbackURL:request.URL];
---
> [self.delegate oauthViewController:self receivedOAuthCallbackURL:[NSURL URLWithString:responseURLString]];
176,177c177,178
< }
< return YES;
---
> }
> return YES;
Only in .: path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment