Giter Site home page Giter Site logo

evernote-sdk-ios's People

Contributors

0xced avatar bzotto avatar garethson avatar jcjimenez avatar mcglincy avatar mustafa avatar sbl avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evernote-sdk-ios's Issues

-[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0xd197fe0

Using iOS 5.1. when using the new API, my app always crashed at (https://github.com/evernote/evernote-sdk-ios/blob/master/evernote-sdk-ios/EvernoteSession.m#L320.

The console show following message:

-[__NSArrayM objectAtIndexedSubscript:]: unrecognized selector sent to instance 0xd197fe0

I noticed NSArray objectAtIndexedSubscript only available in iOS 6.0 or later (https://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html).

Replace the line:

EDAMBootstrapProfile *profile = info.profiles[0];

with

EDAMBootstrapProfile *profile = [info.profiles objectAtIndex:0];

Fixes the issue.

Evernotesession not found

Getting this error.

Undefined symbols for architecture i386:
"OBJC_CLASS$_EvernoteSession"

The set up I have is that I created a submodule in under my project folder, so evernote lives in Project_dir/Submodules/evernote

In my header search path, I set it to be "${SOURCE_ROOT}/Submodules/evernote/evernote-sdk-ios"

Am I doing something wrong?

It is not appropriate to make assumption about user's preferred service only using his locale

This code of EvernoteSession is bad. You are making assumption about user's preferred service just using his locale. In fact, you are subverting his's choice by forcing YinXiangBiJi on him only because he is using Chinese even thought he explicitly states that he wants to use Evernote by specifying BootstrapServerBaseURLStringUS as host. Please don't do that and let users choose their own service.

+ (void)setSharedSessionHost:(NSString *)host
                 consumerKey:(NSString *)consumerKey
              consumerSecret:(NSString *)consumerSecret {
    EvernoteSession *session = [self sharedSession];
    // First see if we already have a profile
    if([ENCredentialStore getCurrentProfile] == EVERNOTE_SERVICE_YINXIANG) {
        session.host = BootstrapServerBaseURLStringCN;
    }
    else if([ENCredentialStore getCurrentProfile] == EVERNOTE_SERVICE_INTERNATIONAL) {
        session.host = BootstrapServerBaseURLStringUS;
    }
    // If not, check what boostrap server you want to use based on the locale
    else if([host isEqualToString:BootstrapServerBaseURLStringUS] || [host isEqualToString:BootstrapServerBaseURLStringCN]) {
        NSString* locale = [[NSLocale currentLocale] localeIdentifier];
        if ([[locale lowercaseString] hasPrefix:kBootstrapServerBaseURLStringCN]) {
            session.host = BootstrapServerBaseURLStringCN;
        }
        else {
            session.host = BootstrapServerBaseURLStringUS;
        }
    }
    else {
        session.host = host;
    }
    session.consumerKey = consumerKey;
    session.consumerSecret = consumerSecret;
}

Images as attachment won't show unless hardcode width & height

ENMLUtility.m

Line 195

        width = [NSNumber numberWithInt:[resource width]];
        height = [NSNumber numberWithInt:[resource height]];

As title says, whenever an image is used as attachment to be displayed in a webview, it won't show unless width & height are hardcoded

incorrect username and/or password

i am using the sample app for ios device

after putting my CONSUMER_KEY and CONSUMER_SECRET
NSString *EVERNOTE_HOST = @"sandbox.evernote.com";

NSString *CONSUMER_KEY = @"moathothmanaliwat";
NSString *CONSUMER_SECRET = @"efd4e31c335c9f8f";

then tap o authentication button ...
interring username and password ..correct one of my account on evernote

i get that message ...incorrect username and/or password
what do i need to do ?!
first time i use evernote sdk ...

thank you

Allow showing a some loading indicator

The new authentication system (using a view controller instead of opening the external browser) in EvernoteSession doesn't currently allow to show a loading indicator when authentication is started. To be explicit, we need some way to get informed when the temp-token is fetched to hide a previously displayed activity indicator. Here are a couple of techniques to do things like that in Objective-C:

  • Allow adding a delegate to EvernoteSession
  • Publish a NSNotification using the NSNotificationCenter
  • Add another callback-block in authenticateWithViewController:completionHandler: (Callback-Blocks are usually not used for things like that (because they retain everything used in it for a potentially long time), they are a bit misused in the evernote-sdk)

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

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

no update on cocoa pods

Hi

It would be great to be able to update our work via cocoa pods. I tried pointing to this github but only got:

Updating spec repo `master'

  • Pre-downloading: Evernote-SDK-iOS' No podspec exists at path/Users/Iain/Xcode projects/EvernoteDone/Pods/Evernote-SDK-iOS/Evernote-SDK-iOS.podspec'.

Crash in [EvernoteSession emptyCookieJar]

 *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString hasSuffix:]: nil argument'

 0   CoreFoundation                       0x2deb0fd3 __exceptionPreprocess + 131
 1   libobjc.A.dylib                      0x38727ccf objc_exception_throw + 36
 2   CoreFoundation                       0x2deb0f15 +[NSException raise:format:] + 102
 3   CoreFoundation                       0x2de2dfa9 -[__NSCFString hasSuffix:] + 90
 4   AppName                              0x000be0fb -[EvernoteSession emptyCookieJar] (EvernoteSession.m:343)
 5   AppName                              0x000be205 -[EvernoteSession authenticateWithViewController:completionHandler:] (EvernoteSession.m:375)

Production Key not working

Hello,

I applied for production key, I got the mail from developer team , that it has been activated, so I tried changing the host from sandbox to production, but I get error

Error authenticating with Evernote service: Error Domain=com.evernote.sdk Code=-3000 "The operation couldn’t be completed.

But it works with sandBox though, not understanding whats going wrong, please help

Regards
Ranjit

3rd party libraries should not be included in the Pod spec

Third party libraries like SSKeychain should not be included as part of the podspec, they should be included as pod dependencies pointing to the relevan pods. Right now if your project requires SSKeychain and Evernote SDK the SSKeychain files will conflict and you will get duplicate symbol errors.

OAuth in inline UIWebView instead of trip to Safari

Authentication trip to Safari can be a source of problems, similar like SSO for Facebook (authentication trip to Safari or Facebook app). Moreover, user has to quit the app he is using. What is the roadmap? Would you consider to do authentication within the sdk in UIWebView, so that user does not need to quit the app, or this is a preparation for Single Sign On in a Facebook way?

Use UIApplicationDidBecomeActiveNotification notification

Instead of do this

- (void)applicationDidBecomeActive:(UIApplication *)application {
    [[EvernoteSession sharedSession] handleDidBecomeActive];
 }

Evernote SDK can subscribe for UIApplicationDidBecomeActiveNotification. And do this thing internally.

HTML to ENML

Couldn't find any such functionality in the SDK. Is this planned for, or did I miss it?

String values in ENAFURLConnectionOperation.h conflicts with AFNetworking

You need to change the value of the constants in 3rdParty/AFNetworking/ENAFURLConnectionOperation.h
and not just the name of the constants.

The values are globals in the entire App and if the App is also using AFNetworking by itself then bad things are happening

you cant use a domain name of a different company ( alamofire in this case)
are you Evernote or not???? it should be com.evernote....

It looks like you have a similar problem in SSKeychain.m

Error when authenticating on device

This works great in the simulator. But when I authenticate on my device with authenticateWithViewController I get Error saving to keychain: Error Domain=com.samsoffes.sskeychain Code=-25308 "The operation couldn’t be completed. (com.samsoffes.sskeychain error -25308.)" -25308
Error getting password from keychain: Error Domain=com.samsoffes.sskeychain Code=-25308 "The operation couldn’t be completed. (com.samsoffes.sskeychain error -25308.)". Any ideas?

Bootstrapping for production service

  1. NSString *EVERNOTE_HOST = BootstrapServerBaseURLStringUS;
  2. NSString *EVERNOTE_HOST = BootstrapServerBaseURLStringCN;

How to use both US and CN service?

Documentation is incorrect in README

This is no longer a valid way to initialize the session...

// set up Evernote session singleton
EvernoteSession *session = [[[EvernoteSession alloc] initWithHost:EVERNOTE_HOST
consumerKey:CONSUMER_KEY
consumerSecret:CONSUMER_SECRET]
autorelease];
[EvernoteSession setSharedSession:session];

Should be:

// set up Evernote session singleton
[EvernoteSession setSharedSessionHHost:EVERNOTE_HOST
consumerKey:CONSUMER_KEY
consumerSecret:CONSUMER_SECRET] ;

authenticated user notebook lookup failure

Not sure the problem, but after a fresh auth i can fetch notebooks, etc just fine. After a little time passes and i run the app it will authenticate but notebook/note/etc lookups all fail (error 9).
Looking at the token it is there and not nil, so im not really sure why my lookups start to fail and dont see any exposed methods other than completely logging out and back in to fix.

Xcode 5.1 64-bit simulator did not run

When trying to run a 64-bit simulator I got error message:
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).

I fixed this problem by doing:
Project Target > Build Settings > Architectures
and make
Build Active Architecture Only = NO

but then I got "Undefined symbols for architecture i386" for libevernote-sdk-ios.a

I fixed this problem by repeating the above procedure for the evernote-sdk-ios project

ENOAuthViewController does not catch OAuth token in webView:shouldStartLoadWithRequest:navigationType:.

In OAuth authorization page, UIWebView does not a catch URL which begin with en-(id?)://response?oauth_token=(token)&oauth_verifier=(verifier) after user's authentication.
I peeked request URL in webView:shouldStartLoadWithRequest:navigationType:., but I counld n't find such as URL.

It's my account's or codes' bug? or server's specification has been changed.....?

My workaround is that to make UIWebViewDelegate catch othe URL such as https://sandbox.evernote.com/Home.action?en-(id?)://response?oauth_token=(token)&oauth_verifier=(verifier) by the following code.

- (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType
{
    NSLog(@"%@", [request.URL absoluteString]);
    if ([[request.URL absoluteString] hasPrefix:self.oauthCallbackPrefix]) {
        // this is our OAuth callback prefix, so let the delegate handle it
        if (self.delegate) {
            [self.delegate oauthViewController:self receivedOAuthCallbackURL:request.URL];
        }
        return NO;
    }
    else if ([[request.URL query] hasPrefix:self.oauthCallbackPrefix]) {
        // this is our OAuth callback prefix, so let the delegate handle it
        if (self.delegate) {
            NSURL *newURL = [NSURL URLWithString:request.URL.query];
            [self.delegate oauthViewController:self receivedOAuthCallbackURL:newURL];
        }
        return NO;
    }
    return YES;
}

Crash in [EvernoteSession userStore]

   0   libobjc.A.dylib                      0x3962e66a objc_release + 10
   1   AppName                              0x000ad4d5 -[EvernoteSession userStore] (EvernoteSession.m:249)
   2   AppName                              0x0010fea3 -[ENAPI userStore] (ENAPI.m:82)
   3   AppName                              0x00116b05 __64-[EvernoteUserStore getBootstrapInfoWithLocale:success:failure:]_block_invoke (EvernoteUserStore.m:67)
   4   AppName                              0x00110af3 __44-[ENAPI invokeAsyncIdBlock:success:failure:]_block_invoke (ENAPI.m:191)

Delete Note Not work

I tried the following code to delete note
[[EvernoteNoteStore noteStore]deleteNoteWithGuid:noteGuid success:
^(int32_t usn){
success(usn);
}
failure:^(NSError* error){
failure(error);
NSLog(@"error=%@",error.description);
}];

but it alway enter failure block and the error was
Error Domain=com.evernote.sdk Code=1 "No information available about the error" UserInfo=0xb924d30 {NSLocalizedDescription=No information available about the error}
I sure about auth because I was able to add not.

Some methods for modal view controllers have been deprecated in iOS6 or later

dismissModalViewControllerAnimated: and presentModalViewController:animated: had been deprecated in iOS6 or later.

For support iOS6 earlier and later, I used the following code.

#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 60000
    [self presentViewController:vc animated:YES completion:^(void){}];
#else
    [self presentModalViewController:vc animated:YES];
#endif

SSKeychain Outdated

I am trying to use via cocoapods but I am getting issues because the evernote ios sdk is dependent on and outdated version of SSKeychain.

Error Message:
[!] Evernote-SDK-iOS (1.3.1) tries to activate SSKeychain (= 0.2.1)', but already activated version1.2.1' by Podfile.

minor - webview loading indicator

It is not urgent, but it would enhance user experience, if there was some indicator of network communication during loading authorisation web view. Something like this (after clicking on "prihlasit sa" (login) authorisation starts, and UIActivityIndicatorView in upper right corner starts to spin)

Uploaded with ImageShack.us

How to edit existing note

We want to develop a app base on evernote-sdk, I want to know how to edit the existing note that's content is a html string. Need a API implement that html string to ENML?

Zombie object when trying to authenticate without internet connection

I got this zombie object when i trying to authenticate without internet connection.

-[__NSDictionaryM objectForKey:]: message sent to deallocated

this is my Authentication Code

-(void)EverNoteIntegrate:(UISwitch *)everNote{

[[GAI sharedInstance].defaultTracker send:[[GAIDictionaryBuilder createEventWithCategory:@"Setting" action:@"Evernote" label:everNote.on?@"YES":@"Close" value:nil]build]];

if (everNote.on) {

    [[EverNoteSync sharedClient] initlize:self WithStatus:^(BOOL status) {

        if (status) {

            if (![AppLocalData isBefoEvernoteNoteBook]) {


                if ([SDCloudUserDefaults stringForKey:@"BefoNotebookGUID"]) {
                    [AppLocalData setEvernoteBefoNotebookGUID:[SDCloudUserDefaults stringForKey:@"BefoNotebookGUID"]];
                    [AppLocalData setBefoNoteBookForEverNote:YES];
                }else{

                    [EverNoteSync createBefoNoteBook:^(BOOL noteBookstatus,NSError *error) {

                        if (!error) {
                            if (noteBookstatus) {
                                [AppLocalData setBefoNoteBookForEverNote:noteBookstatus];
                            }else{
                                [AppLocalData setBefoNoteBookForEverNote:NO];
                            }
                        }else{
                            if (error.code == 10 && [[error.userInfo valueForKey:@"parameter"]isEqualToString:@"Notebook.name"]) {
                                [AppLocalData setEvernoteBefoNotebookGUID:[SDCloudUserDefaults stringForKey:@"BefoNotebookGUID"]];
                                [AppLocalData setBefoNoteBookForEverNote:YES];
                            }
                        }

                    }];

                }

            }

        }else{
            everNote.on = NO;
        }
    }];

}else{
    [[EvernoteSession sharedSession] logout];

}

}

screen shot 2014-05-26 at 2 23 16 pm

screen shot 2014-05-26 at 2 23 34 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.