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
fopenreturns success for
/ var / mobile / Containers / Data / Application / [uuid] / Documents / test namebut 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?