I’m trying to download messages from server and storing it on iPhoine Temp/catch folder like this :
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
NSString *cacheDirectory = [paths objectAtIndex:0];
return cacheDirectory;
But at the same time i.m having issues when messages get unzipped it overriding same name images in the data base and displays same images ion all messages
My question is how to store each FILE IN its own folder inside iOS temp/catch file system so that same name images don’t get override.
Append a directory to your cacheDirectory:
[cacheDirector stringByAppendingPathComponent:@”directoryName”];
You can store individual e-mails inside. I also hash the file URLs as the filename.