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.
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.
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 Code=1 "Missing result: getResourceData failed: unknown result" UserInfo=0x16b40490 {NSLocalizedDescription=Missing result: getResourceData failed: unknown result}
Steps to Reproduce
- Create a note in the Evernote.
- Attach a image to that note.
- And try to download the resource..
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 Code=1 "Missing result: getResourceData failed: unknown result" UserInfo=0x16b40490 {NSLocalizedDescription=Missing result: getResourceData failed: unknown result}
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.
Anybody faced this issue?