Question

I created an ipad project in XCode based on the Evernote SDK sample. The method for testing OAuth worked. I switched from direct sources in project to CocoaPods pod 'Evernote-SDK-iOS', '~> 1.3' and now I'm getting following exception.

When it stopped working I noticed that I was running the simulator for "iPad" unintentionally. I used "iPad Retina 64bit" before when it worked in the beginning. When I switched to 64bit it worked. I tried it in the version with direct sources instead of pods and for "iPad" version it opened Authorizing popup, when I logged in I was able to log in for "iPad" in the CocoaPods version too.... seems that in the CocoaPods version there is a problem with the authorization and not in the difference between simulators... it just works when I first authorize my app using my old code...

Any idea where could be a difference between direct source code in project and using CocoaPods?

I get the exception on row 153: return [data base64EncodedString]; in file ENGCOAuth.m

*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_NSInlineData base64EncodedString]: unrecognized selector sent to instance 0x958ca10'
*** First throw call stack:
(
    0   CoreFoundation         0x01b001e4 __exceptionPreprocess + 180
    1   libobjc.A.dylib        0x009538e5 objc_exception_throw + 44
    2   CoreFoundation         0x01b9d243 -[NSObject(NSObject) doesNotRecognizeSelector:] + 275
    3   CoreFoundation         0x01af050b ___forwarding___ + 1019
    4   CoreFoundation         0x01af00ee _CF_forwarding_prep_0 + 14
    5   MemloNotepad           0x001d378a -[ENGCOAuth signature] + 618
    6   MemloNotepad           0x001d3187 -[ENGCOAuth authorizationHeader] + 167
    7   MemloNotepad           0x001d2fb5 -[ENGCOAuth request] + 245
    8   MemloNotepad           0x001d4dba +[ENGCOAuth URLRequestForPath:GETParameters:scheme:host:consumerKey:consumerSecret:accessToken:tokenSecret:] + 1082
    9   MemloNotepad           0x001eb38c -[EvernoteSession startOauthAuthentication] + 348
    10  MemloNotepad           0x001ead7e __68-[EvernoteSession authenticateWithViewController:completionHandler:]_block_invoke + 558
    11  MemloNotepad           0x001cfec7 __44-[ENAPI invokeAsyncIdBlock:success:failure:]_block_invoke_2 + 55

Note: I already asked this question in Evernote forum but I didn't get any reply for almost one month.

Was it helpful?

Solution

Another StackOverflow question helped me to solve the problem.

I had to add $(inherited) in Other Linker Flags in Build Settings. I had it in one of the targets but not in all of them.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top