Wrote a method to extract zip files in a temp folder and have made such that all the method in class are initiated with NSURL than path but when tried to change path to NSURL it returns null.
//handles all ZIP Extraction -(NSURL*)handleZIPExtractionAtDestination:(NSURL*)destinationURL { NSString *destPath=[[destinationURL path] stringByAppendingPathComponent: [[[_archiveURL lastPathComponent] componentsSeparatedByString:@"."] firstObject]]; BOOL result=[SSZipArchive unzipFileAtPath:[_archiveURL path] toDestination:destPath]; if(!result) { NSLog(@"Couldn't extract the Files."); return nil; } NSLog(@"%@",destPath); NSURL *url=[NSURL URLWithString:destPath]; NSLog(@"%@",url); return url; } Result:
destPath=/private/var/mobile/Containers/Data/Application/43DB7D13-9999-4231-B8AB-885CF8757931/tmp/715F6E97-968B-4FD9-A517-D9C2320A85A3-3213-0000043B8B4AFD91/900156_d378ef9fe1 2
url=null
destPath uses NSTemporaryDirectory with globallyUniqueString from NSProcessInfo