0
问题在iOS8 document directory
路径检测:使用下面的代码从我的应用程序下载的附件保存到documents directory
路径iOS8上的文件目录路径
上午。
//-- Store data to documents folder NSString *resourceDocPath = [[NSString alloc] initWithString:[ [[[NSBundle mainBundle] resourcePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"Documents"]]; NSString *filePath = [resourceDocPath stringByAppendingPathComponent:[NSString stringWithFormat:@"%@",fileName]]; [self.downloadedMutableData writeToFile:filePath atomically:YES];
使用下面的代码以检索文档的形式路径
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0];
- Everythig工作在
ios7
模拟器&设备良好。 - 但是它也没有在
ios8
设备&也在模拟器中找到正确的路径。 - 请有人帮忙存储&退还
ios8
的文件。
- Everythig工作在
如果你已经保存您的文件不在'Document'文件夹中,您可能在_iOS8_上遇到很大的麻烦,因为文件结构已被更改并与应用程序包'不管怎样,你的问题是什么? – holex 2014-10-28 14:24:07
在iOS 8文档导演路径位置发生变化。 [检查这个答案] [1] [1]:http://stackoverflow.com/questions/25198840/document-directory-path-of-ios-8-beta-simulator – 2014-10-30 11:03:12