0

I try to download contents from App store, I download it successfully, now I try to unzip the downloaded file using SSZipArchive. my content file contains video file. (This is the way I upload content file to App Store steps I did

Here is my code to unzip

NSString *zipPath = @"/private/var/mobile/Applications/1433FA1B-24FA-4E39-BB57-80569ECBCBAB/Library/Caches/7AD5C113-253D-4F34-8030-612FFE4347E1.zip";

NSString *outputPath = [self _cachesPath:@"Regular"];

[SSZipArchive unzipFileAtPath:zipPath toDestination:outputPath delegate:self];

NSString *testPath = [outputPath stringByAppendingPathComponent:@"videofile.mp4"];

bool fileExists = [[NSFileManager defaultManager] fileExistsAtPath:testPath];

if (fileExists)
{
     NSLog(@"file exists");
}
else
{
     NSLog(@"file not exists");
}

always I got file file not exists. How can I get the video file?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Ramesh
  • 105
  • 3
  • 14
  • 1
    Don't hard code your path. Use the runtime to determine the correct one. It will change between installs. – borrrden Oct 25 '13 at 06:13
  • https://code.google.com/p/ziparchive/downloads/list try this – square Oct 25 '13 at 06:27
  • NSString *zipPath = @"/private/var/mobile/Applications/1433FA1B-24FA-4E39-BB57-80569ECBCBAB/Library/Caches/7AD5C113-253D-4F34-8030-612FFE4347E1.zip"; for understand code I put like this in query, in real time I get original path only. – Ramesh Oct 25 '13 at 06:28
  • @square, I try this too, Static path working fine but runtime path not working. – Ramesh Oct 25 '13 at 06:29
  • @square, I place my video file inside /Supporting Files/, Any thing wrong in it ? – Ramesh Oct 25 '13 at 06:31
  • what is the error coming – square Oct 25 '13 at 06:35
  • Did not get any error. outputPath: /var/mobile/Applications/B4876252-D60D-433F-877E-813773002382/Library/Caches/ests/Regular/, upto this shows exists, but dont know how to get that video. How can I check that file is unziped or not yet ? – Ramesh Oct 25 '13 at 06:38
  • @square, I'm not getting any error. How can I check that file is unziped or not yet ? – Ramesh Oct 25 '13 at 07:02

0 Answers0