1)我将一些 csv 文件逐一保存在我的印象笔记中,但我希望所有文件都在一个笔记本下。目前我在默认笔记本下保存笔记,但我想创建一个笔记本,然后我想将我的笔记保存在那个笔记本中
2)目前我正在将该csv文件转换为数据,以便在再次显示csv文件后显示一些附件
但是如何将文件直接保存到evernote而不将其转换为数据?我正在使用以下代码
NSData *NewdataHash = [NewFileData md5];
EDAMData *NewedamData = [[EDAMData alloc] initWithBodyHash:NewdataHash size:NewFileData.length body:NewFileData];
EDAMResource* Newresource = [[EDAMResource alloc] initWithGuid:nil noteGuid:nil data:NewedamData mime:@"application/csv" width:0 height:0 duration:0 active:0 recognition:0 attributes:nil updateSequenceNum:0 alternateData:nil];
NSString *NewnoteContent = [NSString stringWithFormat:@"<?xml version=\"1.0\" encoding=\"UTF-8\"?>"
"<!DOCTYPE en-note SYSTEM \"http://xml.evernote.com/pub/enml2.dtd\">"
"<en-note>"
"<span style=\"font-weight:bold;\">CountDown DairiesList.</span>"
"<br />"
"<span>Evernote logo :</span>"
"<br />"
"%@"
"</en-note>",[ENMLUtility mediaTagWithDataHash:NewdataHash mime:@"application/csv"]];
NSMutableArray* Newresources = [NSMutableArray arrayWithArray:@[Newresource]];
EDAMNote *NewnewNote = [[EDAMNote alloc] initWithGuid:nil title:@"DairiesList CSV" content:NewnoteContent contentHash:nil contentLength:NewnoteContent.length created:0 updated:0 deleted:0 active:YES updateSequenceNum:0 notebookGuid:nil tagGuids:nil resources:Newresources attributes:nil tagNames:nil];
[[EvernoteNoteStore noteStore] createNote:NewnewNote success:^(EDAMNote *note)
{
}
failure:^(NSError *error) {
}];