Evernote iOS Cloud SDK-下载EDAMResource数据时出错 [英] Evernote iOS Cloud SDK- Error in downloading EDAMResource data
问题描述
我已从IOS evernote sdks Migration_from_SDK_1_x.md迁移到evernote-cloud-sdk-ios,以支持Daily Notes应用程序的64位体系结构.
I have migrated from the IOS evernote sdks Migration_from_SDK_1_x.md to evernote-cloud-sdk-ios to support the 64 bit architecture for our Daily Notes app.
我已遵循指南中提到的步骤(https://github.com/evernote/evernote-cloud-sdk-ios/blob/master/Migration_from_SDK_1_x.md )进行迁移.
I have followed the procedure mentioned in the guide(https://github.com/evernote/evernote-cloud-sdk-ios/blob/master/Migration_from_SDK_1_x.md) to migrate.
迁移后,除了下载资源数据之外,其他所有东西都工作正常.
After migrating everything is working fine except the download of resource data.
当我尝试使用ENNoteStoreClient类的getResourceDataWithGuid:API下载附件(图像)时,我们始终会收到以下错误消息.
When I am trying to download the attachments(images) using ENNoteStoreClient class's getResourceDataWithGuid: API, we get the following error all the time.
Error Domain = ENErrorDomain代码= 1缺少结果:getResourceData失败:未知结果" UserInfo = 0x16b40490 {NSLocalizedDescription =缺少结果:getResourceData失败:未知结果}
Error Domain=ENErrorDomain Code=1 "Missing result: getResourceData failed: unknown result" UserInfo=0x16b40490 {NSLocalizedDescription=Missing result: getResourceData failed: unknown result}
复制步骤
- 在Evernote中创建笔记.
- 在该笔记上添加图片.
- 并尝试下载资源.
下面是获取EDAMNote,然后从中获取EDAMResource的代码段.
Below is the code snippet for getting the EDAMNote and then getting the EDAMResource from it .
ENNoteStoreClient *noteStore=[ENSession sharedSession].primaryNoteStore;
EDAMSyncChunkFilter *filter=[[EDAMSyncChunkFilter alloc]init];
filter.includeNotes = @YES;
filter.includeNoteResources = @YES;
filter.includeNoteAttributes = @YES;
filter.includeNotebooks = @YES;
filter.includeTags = @YES;
filter.includeSearches = @NO;
filter.includeResources = @NO;
filter.includeLinkedNotebooks = @NO;
filter.includeExpunged = [NSNumber numberWithBool:!fullSunc];
filter.includeNoteApplicationDataFullMap = @YES;
filter.includeResourceApplicationDataFullMap = @NO;
filter.includeNoteResourceApplicationDataFullMap = @YES;
filter.requireNoteContentClass = nil;
[noteStore getFilteredSyncChunkAfterUSN:currentUSN
maxEntries:255
filter:filter
success:^(EDAMSyncChunk *syncChunk)
{
completionHandler(syncChunk,nil);
}
failure:^(NSError *error)
{
completionHandler(nil,error);
}];
}
//I then extract the required EDAMNote from the syncChunk.
5. if I try to download the resource associated with this EDAMNote using "getResourceDataWithGuid:" API, it always returns the error. This was working fine in earlier version. Here is the code snippet.
EDAMResource *resource = self.evernoteResource;
ENNoteStoreClient *noteStore = [ENSession sharedSession].primaryNoteStore;
[noteStore getResourceDataWithGuid:resource.guid success:^(NSData *data)
{
} failure:^(NSError *error)
{
}];
}
Error Domain = ENErrorDomain代码= 1缺少结果:getResourceData失败:未知结果" UserInfo = 0x16b40490 {NSLocalizedDescription =缺少结果:getResourceData失败:未知结果}
Error Domain=ENErrorDomain Code=1 "Missing result: getResourceData failed: unknown result" UserInfo=0x16b40490 {NSLocalizedDescription=Missing result: getResourceData failed: unknown result}
在出现此错误之前,我还在SDK设置的控制台中观察到以下日志.跳过字段:由于类型不匹配(收到:11).
I have also observed the following log in the console put up by the SDK before getting this error. Skipping field: due to type mismatch (received:11).
我已经在示例应用程序中尝试了此过程,并观察到了相同的行为.
I have tried this procedure in the sample app and observed the same behaviour.
有人遇到这个问题吗?
推荐答案
此问题已在SDK的最新更新中修复.在Github上看到此问题: https://github.com/evernote/evernote-cloud-sdk-ios/issues/73
This issue was fixed in latest update to the SDK. See this issue on Github: https://github.com/evernote/evernote-cloud-sdk-ios/issues/73
这篇关于Evernote iOS Cloud SDK-下载EDAMResource数据时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!