xcode - authenticating and getting notebook list Evernote iOS Objective C -


i trying implement evernote, need login , notebook list. implemented following code ..

   ensession *session = [ensession sharedsession];     [[ensession sharedsession] authenticatewithviewcontroller:self preferregistration:no completion:^(nserror *authenticateerror) {       if (authenticateerror || !session.isauthenticated) {         nslog(@"error : %@",authenticateerror);         uialertview *alert = [[uialertview alloc] initwithtitle:@"error"                                                         message:@"could not authenticate"                                                        delegate:nil                                               cancelbuttontitle:@"ok"                                               otherbuttontitles:nil];         [alert show];     } else {         [self updatebuttonsforauthentication];     }  }];  - (void)updatebuttonsforauthentication {     ensession *session = [ensession sharedsession];      if (session.isauthenticated) {         [self showuserinfo];     } else {      } }  - (void)showuserinfo {     enuserstoreclient *userstore = [[enuserstoreclient alloc]init];     [userstore fetchuserwithcompletion:^(edamuser *  user, nserror * _nullable error) {         nslog(@"%@",user);         nslog(@"%@",user.username);     }]; } 

in showuserinfo method getting edamuser nil , want notebook list well.,any great.

did import the:

#import <ensdk/advanced/ensdkadvanced.h> 

if haven't read yet, reference may you: https://github.com/evernote/evernote-cloud-sdk-ios/blob/master/working_with_the_advanced_(edam)_api.md


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -