For the past 5 or 6 months i have been saving images to a Photos folder in which i created within the documents directory on the users device. The photos would then be loaded into an imageView when the user entered a specific screen, until recently this has been working perfectly.
Now the images no longer show in the image view and when using the URL to print out the image width and height, the values are zero even though the URL has not changed.
I am using the following code to display the image within the image view.
outputImageView = [[UIImageView alloc] init];
[outputImageView setFrame:originalImageViewSize];
outputImageView.image = [UIImage imageWithData:[NSData dataWithContentsOfFile:photoURL]];
NSLog(@"width %f, height %f", outputImageView.image.size.width, outputImageView.image.size.height);
the photoURL is as follows: /Users/fernandosantos/Library/Developer/CoreSimulator/Devices/6F3FCE2A-F7F9-4F77-B66D-3DA2A25BE166/data/Containers/Data/Application/C3867EFA-6AA8-4B71-A856-DCF7F83DEFF0/Documents/AUDIBURY/Photos/COMMTRCIAL-CSRSignature--2014-10-13 10-49-16.jpg
Thanks
[NSData dataWithContentsOfFile:photoURL]is returning nil. Are you seeing this issue with iOS 8 Specifically? If so.. You need to show us how you are getting thephotoURL. In iOS 8 the directory structure for your sandbox has changed, if you're not using the correct APIs to get the file path then the photoURL will be incorrect. See my answer here for more info about the changes in iOS 8: stackoverflow.com/a/25885321/814389