我正在做一个可以将笔记同步到evernote的reder应用程序,我找到了应用程序接口和示例代码,我将它集成到我的应用程序中,并根据out needs.and对其进行分类。我创建了一个沙盒用户帐户,用于在生产service.in之前检查应用程序。我们需要通过静态方式给出用户名和密码。
#import "Evernote.h"
NSString * const username = @"usernme";
NSString * const password = @"pswrd123";
NSString * const userStoreUri = @"https://sandbox.evernote.com/edam/user";
NSString * const noteStoreUriBase = @"https://sandbox.evernote.com/edam/note/";
@implementation Evernote但是我需要像我们的登录页面一样使用用户名和密码文本字段来实现这一点。通过静态地添加这个值,我能够向evernote发送通知,说明如何使用textfiled动态地给出用户名。提前谢谢。
发布于 2012-05-10 23:15:20
使用最新的evernote ios sdk,您可以通过oauth进行身份验证。
// set up Evernote session singleton
[EvernoteSession setSharedSessionHost:EVERNOTE_HOST
consumerKey:EVERNOTE_CONSUMER_KEY
consumerSecret:EVERNOTE_CONSUMER_SECRET];
EvernoteSession *session = [EvernoteSession sharedSession];
[session authenticateWithCompletionHandler:^(NSError *error) {
if (error || !session.isAuthenticated) {
UIAlertView *alert = [[[UIAlertView alloc] initWithTitle:@"Error"
message:@"Could not authenticate"
delegate:nil
cancelButtonTitle:@"OK"
otherButtonTitles:nil] autorelease];
[alert show];
} else {
DLog(@"Evernote auth ready");
[self _authDidCompleted];
}
}];发布于 2012-01-25 17:50:20
创建两个文本字段,一个用于用户名,另一个用于密码。同时创建IBOutlets。然后,您可以编写以下代码
NSString * const username = textField1.text;
NSString * const password = textField2.text; 我真的不知道你的问题是否正确。但是,希望这对……有所帮助。
https://stackoverflow.com/questions/8999860
复制相似问题