我从采摘的iCloud和谷歌文档等驱动,并使用这种方法- (void)documentPicker:(UIDocumentPickerViewController *)controller didPickDocumentAtURL:(NSURL *)url
获取错误 - (BOOL)copyItemAtURL:(NSURL *)srcURL的toURL:(NSURL *)dstURL错误:(NSError **)错误
我收到网址file:///private/var/mobile/Containers/Data/Application/34C6FC23-C8BF-407E-AD67-77758BD606E9/tmp/com.company.theApp-Inbox/chart%20(1).pdf
,但是当我这样做[[NSFileManager defaultManager]copyItemAtURL:url toURL:docUrl error:&error];
我收到此错误Error Domain=NSCocoaErrorDomain Code=262 "The file couldn’t be opened because the specified URL type isn’t supported." UserInfo={NSURL=/var/mobile/Containers/Data/Application/34C6FC23-C8BF-407E-AD67-77758BD606E9/Documents/documents/12345678901-1470638583.pdf}
,这是我docUrl = /var/mobile/Containers/Data/Application/34C6FC23-C8BF-407E-AD67-77758BD606E9/Documents/documents/12345678901-1470638583.pdf
这是我在做什么NSURL * docUrl = [NSURL URLWithString:[documentFolderDataPath stringByAppendingPathComponent:FN]]; –
如果你改变它:'NSURL * docUrl = [NSURL fileURLWithPath:[documentFolderDataPath stringByAppendingPathComponent:fn]];'? – Roy
非常感谢:) ..... –