EasyShare for Evernote
• Practice-1 : Development environment setup and
using Evernote OAuth API
• Practice-2 : List all of notebooks in your Evernote
• Practice-3 : List all of notes in a notebook
• Practice-4 : Render note content in UIWebView
• Practice-5 : Share your note to social network
Practice-1 SDK setup &
• Xcode 5.x +
• cocoapods installation—> sudo gem install
• Create an iOS project named EasyShare by Xcode
Evernote SDK setup
• create a ﬁle named Podﬁle in your root of project
plateform :iOS , ‘7.0’
pod ‘Evernote-SDK-iOS’, ‘1.3.1’
• pod install
• Open EasyShare.xcworkspace in Xcode
Initialize SDK -1
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:
// Initial development is done on the sandbox service!
// Change this to BootstrapServerBaseURLStringUS to use the production Evernote
// Change this to BootstrapServerBaseURLStringCN to use the Yinxiang Biji production
// Bootstrapping is supported by default with either BootstrapServerBaseURLStringUS or
// BootstrapServerBaseURLStringSandbox does not support the Yinxiang Biji service!
NSString *EVERNOTE_HOST = BootstrapServerBaseURLStringUS; //使⽤用Production Server!
// Fill in the consumer key and secret with the values that you received from Evernote!
// To get an API key, visit http://dev.evernote.com/documentation/cloud/!
NSString *CONSUMER_KEY = @"your key";!
NSString *CONSUMER_SECRET = @"your secret";!
// set up Evernote session singleton!
// Restart any tasks that were paused (or not yet
started) while the application was inactive. If the
application was previously in the background, optionally
refresh the user interface.!
SingleTon need to know in
• [EvernoteSession sharedSession], responsible
for login/logout, login status
Classes need to know in this
• EDAMNoteFilter -> setup ﬁlter condition for query
• EDAMNotesMetadataResultSpec -> Setup which
note metadata ﬁelds would return from cloud
• EDAMNoteMetadata -> Class of note metadata!
• EDAMNotesMetadataList , Container for notes
To Sync or not to ?
• Evernote Sync API is another topic, Sync API like
Mail IMAP protocol which sync all of cloud changes
set to your App
• Do you need all of notebook/notes in your App?
• Limit for API calling for each hours
• Implement Cache in your App for reducing Rate
• Detail-> http://dev.evernote.com/doc/articles/
• Note include in Evernote iOS SDK, Need to use
HTTP request to fetch each note’s thumb image
• Please refer to http://dev.evernote.com/doc/articles/
• User’s own Notebook->EDAMNotebook
• Notebook shared by friend ->EDAMLinkbook
• Business Notebook
• Take care about differences between each
Limitations for Writing to
• Note content body need to be ENML format,
EDAMWriter class could help you
• EDAMLimits.h & EDAMLimits.m has a lot of Regular
express for checking your input data