• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

evernote/evernote-cloud-sdk-ios: Evernote Cloud SDK for iOS

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

evernote/evernote-cloud-sdk-ios

开源软件地址:

https://github.com/evernote/evernote-cloud-sdk-ios

开源编程语言:

Objective-C 99.8%

开源软件介绍:

Evernote Logo

Evernote Cloud SDK 3.0 for iOS

This is the official Evernote SDK for iOS. To get started, follow the instructions bellow. Additional information can be found in the Getting Started Guide.

More information about our developer program can be found here: Evernote Developers

Installation

Cocoapods

pod 'EvernoteSDK', '~> 3.0'

Manually

Drag & Drop evernote-sdk-ios.xcodeproj into your project.

Now open your target's Build Phases and add the following items to your Link Binary With Libraries section:

  • EvernoteSDKiOS.framework
  • MobileCoreServices.framework
  • libxml2.dylib

Configuration

Users will have the fastest OAuth experience in your app if they already have the Evernote app installed. When this is the case, the authentication process will bounce to the Evernote app and authenticate without the user needing to enter their credentials at all. To enable this add following two properties to your Info.plist:

Note When your app is in development and uses the "sandbox" environment, authentication will always use web-based OAuth, even if you have the Evernote app installed. After upgrading to a production consumer key, be sure to test authentication again with the Evernote app.

Usage

API Token

Register for an Evernote API key (and secret)...

You can do this on the Evernote Developers portal page. Most applications will want to do this-- it's easy and instant. During development, you will point your app at Evernote's "sandbox" development environment. When you are ready to test on production, we will upgrade your key. (You can create test accounts on sandbox by just going to sandbox.evernote.com).

...or get a Developer Token

You can also just test-drive the SDK against your personal production Evernote account, if you're afraid of commitment or are building a one-off tool for yourself. Get a developer token here. Make sure to then use the alternate setup instructions given in the "Key Setup" section below.

Import

Simply import the SDK inside your project:

import EvernoteSDK
#import <EvernoteSDK/EvernoteSDK.h>

API Key Setup

ENSession.setSharedSessionConsumerKey(<Consumer Key>, consumerSecret:<Consumer Secret>, optionalHost: ENSessionHostSandbox)

// using a developer token:
// ENSession.setSharedSessionDeveloperToken(<Dev Token>, noteStoreUrl: <Note Store URL>)
[ENSession setSharedSessionConsumerKey:<Consumer Key> consumerSecret:<Consumer Secret> optionalHost:ENSessionHostSandbox];

Authentication

ENSession.shared.authenticate(with: self, preferRegistration: false, completion: { (_error: Error?) in

})
[[ENSession sharedSession] authenticateWithViewController:self preferRegistration:NO completion:^(NSError *authenticateError) {

}];

Documentation




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap