I have an app that generates a .pdf file from a picture. If I go read the file in the same session as I took the picture, the file shows up properly.
However, if I restart the application, the file does not open. Obviously nothing changes in the code of the application when the app restarts, so the location references remain the same.
The file is being saved to this location:
/var/mobile/Containers/Data/Application/E119DC03-347B-4C84-B07B-C607D40D26B9/Documents/Test_1_Mod.pdf
The odd part is that if I go to the "devices" section of Xcode, I can see the files in the Documents folder, before and after restarting the application:
Edit: Here's how I'm getting the location to save the file:
NSArray *arrayPaths =
NSSearchPathForDirectoriesInDomains(
NSDocumentDirectory,
NSUserDomainMask,
YES);
NSString *path = [arrayPaths objectAtIndex:0];
modified_pdfFileName = [path stringByAppendingPathComponent:modified_filename_pdf];
So, am I saving the file in the wrong location?
Does the file move, somehow during the restart?
Any suggestion for this issue?
Thanks