Hi in my app I have to get file from iCloud.. I enable iCloud all working fine in Simulator.. But when I test in iPhone, I can see the iCloud files when I choose the default delegate calls but I can't get data from the url..
- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url
{
NSData *pdfData = [[NSData alloc] initWithContentsOfURL:url];
}
Always I getting pdfData
as nil. I log the error
Error Domain=NSCocoaErrorDomain Code=257 "The operation couldn’t be completed. (Cocoa error 257.)" UserInfo=0x17029810 {NSFilePath=/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/download (2).jpeg, NSUnderlyingError=0x15ea9680 "The operation couldn’t be completed. Operation not permitted"}
I cant figure out.. Can you please help me to fix this issue..