How can I untag from a note in Evernote Swift SDK?

68 views Asked by At

I want to delete all tags from a note using Evernote swift SDK. Here is my code, but I cannot delete them with this, any way to do that?

ENSession.shared.download(noteRef!, progress: nil) { (note: ENNote?, error: Error?) in
    if error == nil {

        note?.tagNames = [String]()

        ENSession.shared.upload(note!, policy: .replace, to: nil, orReplace: noteRef, progress: nil, completion: { (noteRef: ENNoteRef?, error: Error?) in
            if error == nil {
                print("Tag Deleted")
            }
        })
    }
}
1

There are 1 answers

0
kentaro On

Can you try this?

note?.tagGuids = [String]()