如何在ios中解压缩文件

如何在ios中解压缩文件,ios,app-store,unzip,ssziparchive,Ios,App Store,Unzip,Ssziparchive,我尝试从App store下载内容,我成功下载了它,现在我尝试使用SSZipArchive解压下载的文件。我的内容文件包含视频文件。(这是我上传内容文件到应用商店的方式 这是我要解压缩的代码 NSString *zipPath = @"/private/var/mobile/Applications/1433FA1B-24FA-4E39-BB57-80569ECBCBAB/Library/Caches/7AD5C113-253D-4F34-8030-612FFE4347E1.zip"; NSS

我尝试从App store下载内容,我成功下载了它,现在我尝试使用SSZipArchive解压下载的文件。我的内容文件包含视频文件。(这是我上传内容文件到应用商店的方式

这是我要解压缩的代码

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");
}

“始终我获取的文件文件不存在。如何获取视频文件?

不要硬编码您的路径。使用运行时确定正确的路径。它将在安装之间更改。请尝试此NSString*zipPath=@”/private/var/mobile/Applications/1433FA1B-24FA-4E39-BB57-80569ECBCBAB/Library/Caches/7AD5C113-253D-4F34-8030-612FFE4347E1.zip”;为了理解我在查询中这样放置的代码,在实时情况下,我只获取原始路径。@square,我也尝试了这个,静态路径工作正常,但运行时路径不工作。@square,我将视频文件放在/Supporting Files/中,有什么错误吗?