Question

EverNote sdk :

Wanted to know if there is a method to get the tagGuids from the tagName. For instance the tag name is ShoppingList whats the corresponding tagGuids.

enter image description here

Need to fill the TODO:

// TODO: Given the tag name, get the  tagGuid here.

EDAMNoteFilter* filter = [[EDAMNoteFilter alloc] initWithOrder:0 ascending:NO words:nil notebookGuid:nil tagGuids:nil timeZone:nil inactive:NO emphasized:nil];
Was it helpful?

Solution

I found the answer

 [[EvernoteNoteStore noteStore] listTagsWithSuccess:^(NSArray *tags) {
                for(EDAMTag *tag in tags)
                {
                    if([tag.name isEqualToString:@"ShoppingList"])
                    {
                         EDAMNoteFilter* filter = [[EDAMNoteFilter alloc] initWithOrder:0 ascending:NO words:nil notebookGuid:nil tagGuids:[@[tag.guid] mutableCopy] timeZone:nil inactive:NO emphasized:nil];
                    }

                    break;
                }
            } failure:^(NSError *error) {
                NSLog(@"tag error : %@",error);

            }];

Let me know if there is better way to do this.

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