0
我試圖做一個文件,將文件解壓縮並將內容放置在正確的位置。我需要將ZIP文件的內容解壓到 〜/ Library/Application Support/Contents。 我該怎麼做?謝謝!Apple XCode Self-Extractor
我試圖做一個文件,將文件解壓縮並將內容放置在正確的位置。我需要將ZIP文件的內容解壓到 〜/ Library/Application Support/Contents。 我該怎麼做?謝謝!Apple XCode Self-Extractor
unzip
命令行工具,與NSTask
啓動將執行此項工作。
NSArray* arguments = [NSArray arrayWithObjets:@"Path/to/your/zip/file", @"-d", @"~/Library/Application Support/Your_App/", nil];
[NSTask launchedTaskWithLaunchPath:@"usr/bin/unzip" arguments:arguments];
這是在Mac上,iOS它有點不同。 – gcamp