ios - Evernote API: How to upload a note with pure ENML instead of plain text -


i'm trying set content of note raw enml when upload note , @ note in sandbox web app looks treating enml plain text. how upload note raw enml can use of features in enml? here swift code:

let note: ennote = ennote() note.title = title   let testemlstring: string =     "<?xml version=\'1.0\' encoding=\'utf-8'?>" +     "<!doctype en-note system\"http://xml.evernote.com/pub/enml2.dtd\">" +     "<en-note>" +       "<div><br /></div>" +       "<div>" +         "<span style=\"font-size: 18px;\">" +           "<b>hello world</b>" +         "</span>" +       "</div>" +       "<div><br /></div>" +    "</en-note>"  note.content = ennotecontent(string: testemlstring)  ensession.sharedsession().uploadnote(note, notebook: nil, completion: { noteref, error in  if error == nil {       print("note upload ok")  } else {       print("upload note error: \(error)")  } }) 

i read in posting ennotecontent class has constructor if import advanced header in bridging-header.h file:

#import <ensdk/ensdk.h> #import <ensdk/advanced/ensdkadvanced.h> 

but causes compile time error in: ensdkadvanced.h saying:

ensdk.h file not found 

hopefully can help. thanks

i had same issue.

change ensdk import link follows

from "ensdk.h" <ensdk/ensdk.h>

this need changed in these files:

  • ensdkadvanced.h
  • ennotestoreclient.h
  • ensdkprivate.h

that's it!


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -