I've got the point where I am downloading the hosted In-App Purchase. It downloads the hosted In App Purchase content to the Cache directory, but as I need hosted In App Purchase content to be permanent I need to move it to the Documents directory.
Once it is in there I then need to actually access the contents.
I am using
NSURL *url = download.contentURL;
NSError *error = nil;
NSArray *properties = [NSArray arrayWithObjects: NSURLLocalizedNameKey,
NSURLCreationDateKey, NSURLLocalizedTypeDescriptionKey, nil];
NSArray *zipContentsArray = [[NSFileManager defaultManager]
contentsOfDirectoryAtURL:url
includingPropertiesForKeys:properties
options:(NSDirectoryEnumerationSkipsHiddenFiles)
error:&error];
Which shows the output in the Cache
The download's contentURL is
file:///private/var/mobile/Applications/**/Library/Caches/***.zip/
zipContentsArray = (
"file:///private/var/mobile/Applications/***/Library/Caches/***.zip/ContentInfo.plist",
"file:///private/var/mobile/Applications/***/Library/Caches/***.zip/Contents/",
"file:///private/var/mobile/Applications/**/Library/Caches/***.zip/META-INF/"
)
How would I get to the Contents (even from within the Caches folder - it would be the same process regardless of its location, I'm assuming)?
It's maddening how little documentation there is from Apple surrounding this whole process, so any help would be very greatly received.