0

试图从 UITextView 获取文本到 Evernote 中的笔记。Evernote SDK 已安装授权并链接正常。

出于某种原因,字符串noteContent就像 ; layer = ; contentOffset: {0, 0}>在 Evernote 中显示时一样

if([[EvernoteSession sharedSession] isEvernoteInstalled]) {

    //tags
    NSMutableArray *tagNames = [NSMutableArray arrayWithObjects:@"iCertifi",@"electrical",@"certificates", nil];

     NSString *noteContent = [NSString stringWithFormat:@"%@",self.note.text];

    //Note
    EDAMNote* note = [[EDAMNote alloc] initWithGuid:nil title:@"Test Note - Evernote SDK" content:noteContent contentHash:nil contentLength:0 created:0 updated:0 deleted:0 active:YES updateSequenceNum:0 notebookGuid:nil tagGuids:nil resources:nil attributes:nil tagNames:tagNames];
    [[EvernoteSession sharedSession] setDelegate:self];
    [[EvernoteNoteStore noteStore] saveNewNoteToEvernoteApp:note withType:@"text/html"];
}
4

1 回答 1

0

好的,修复了这个

需要设置

[[EvernoteNoteStore noteStore] saveNewNoteToEvernoteApp:note withType:@"text/html"];

[[EvernoteNoteStore noteStore] saveNewNoteToEvernoteApp:note withType:@"text/plain"];

于 2013-10-20T15:24:52.433 回答