قالب وردپرس درنا توس
Home / IOS Development / ios – iOS10 file system – are files no longer in app container?

ios – iOS10 file system – are files no longer in app container?



For troubleshooting I have often written data to files on iOS using code like this …

  NSString * docsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
NSString * filePath = [docsPath stringByAppendingPathComponent:testName];
FILE * resultsFile = fopen ([filePath UTF8String] "w");

… and then got the data by downloading the container via Xcode (by selecting the app on the "Window-> Devices" screen and selecting "Download container …" from the "Small gear" pop-up menu right below list of apps.)

I remember this working on iOS 9 and earlier, but trying this on iOS 1

0 on an iPhone 6, I find it doesn't work anymore. The call to fopen returns success for / var / mobile / Containers / Data / Application / [uuid] / Documents / test name but the file is not in the container when I download it.

Shouldn't the file be in the container? Is it elsewhere? Or is it not possible to dump data into a file and pull it off the phone anymore?


Source link