由于密码学出口法规,有可能使用这个库吗?或者我可以使用哪一种压缩/解压缩文件?它允许在App Store中使用ssziparchive库吗?
回答
我不知道SSZipArchive是否允许在分布式应用程序中使用,但我使用的库是Objective-Zip。
它可以很容易地集成到任何项目。为压缩和解
示例代码:
// create a zip file for writing
ZipFile *zipFile= [[ZipFile alloc] initWithFileName:pathOfTheFileToBeZipped mode:ZipFileModeCreate];
// Add a file, write to its stream and close it
ZipWriteStream *stream1= [zipFile writeFileInZipWithName:@"abc.txt" fileDate:[NSDate dateWithTimeIntervalSinceNow:-86400.0] compressionLevel:ZipCompressionLevelBest];
NSString *text= @"abc";
[stream1 writeData:[text dataUsingEncoding:NSUTF8StringEncoding]];
[stream1 finishedWriting];
// Add another file, write to its stream and close it
ZipWriteStream *stream2= [zipFile writeFileInZipWithName:@"x/y/z/xyz.txt" compressionLevel:ZipCompressionLevelNone];
NSString *text2= @"XYZ";
[stream2 writeData:[text2 dataUsingEncoding:NSUTF8StringEncoding]];
[stream2 finishedWriting];
// Close the zip file
[zipFile close];
示例代码解压:
// open the zip file for reading
ZipFile *unzipFile = [[ZipFile alloc] initWithFileName:pathOfTheFileToBeUnzipped mode:ZipFileModeUnzip];
// retrieve the info of the files inside
NSArray *infos= [unzipFile listFileInZipInfos];
// iterate over files
for (FileInZipInfo *info in infos) {
// locate the file in the zip
[unzipFile locateFileInZip:info.name];
// expand the file in memory
ZipReadStream *read= [unzipFile readCurrentFileInZip];
NSData *data = [read readDataOfLength:info.length];
[read finishedReading];
// construct the folder/file path structure
NSString *unzipPathFilename = [unzipPath stringByAppendingPathComponent:info.name];
NSString *unzipPathFoldername = [[unzipPathFilename stringByDeletingLastPathComponent] copy];
NSError *errorw;
// write the unzipped files, with some consistency checks
NSRange range = [unzipPathFoldername rangeOfString:@"__MACOSX"];
if (range.location == NSNotFound) {
if ([fileManager createDirectoryAtPath:unzipPathFoldername withIntermediateDirectories:YES attributes:nil error:&errorw]) {
if (![[unzipPathFilename pathExtension] isEqualToString:@""] && ![[[unzipPathFilename lastPathComponent] substringToIndex:1] isEqualToString:@"." ]) {
[data writeToFile:unzipPathFilename atomically:NO];
}
}
else {
NSLog(@"Directory Fail: %@", errorw);
}
}
}
// close the zip file
[unzipFile close];
第二部分是他的问题是询问他应该使用哪个库来进行压缩/解压缩。他没有严格规定他需要加密,而是询问是否允许使用使用加密的SSZipArchive,这是我不知道的。 – tolgamorf 2013-03-05 23:58:56
我不想/需要加密,这个库Objective-Zip使用加密?感谢您的回答 – aprunedamtz 2013-03-06 22:23:05
不,它不使用加密。但是,如果需要,您可以使用密码保护您的zip文件。 – tolgamorf 2013-03-07 01:21:39
其实你都不允许有加密的iOS应用。 您只需向NSA提交您的应用程序以及应用程序的加密类型。 回复您的注册号码通常需要30分钟。 它是自动或半自动的。 他们只是收集有关开发人员的信息。
作为iOS开发者注册更简单。
我的看法: -
如果不使用ZIP库加密,那么你应该提交的任何应用程序。 链接器将优化后删除该代码。 该代码未被使用。但是,如果你使用加密,即使是iOS来的,那么你应该申请。 例如如果UIWebView打开https:// URL(例如Facebook),但如果使用UIWebView打开不安全的页面,则不应用。
很高兴知道,谢谢 – aprunedamtz 2013-03-08 17:23:23
- 1. Apple是否允许在App Store中使用JavaScript上下文?
- 2. 将iOS库音乐复制到App Store允许的视频中?
- 3. iPhone App Store应用程序允许使用内部脚本/编程语言吗?
- 4. 在iPhone App Store中允许摆动功能等?
- 5. 如果我访问应用程序内的iPhone序列号,它是否允许在App Store中使用?
- 6. 允许在App Store中发布应用的最低sdk是多少?
- 7. 它允许在FQL中使用两个WHERE子句吗?
- 8. Apple App Store:是否允许使用密码保护的应用程序?
- 9. Mac App Store是否允许应用程序使用非Apple Java运行时?
- 10. 是Android库中允许的java库吗?
- 11. 如何允许App Store的特定设备?
- 12. &允许使用XML吗?
- 13. 如何在App Store上发布iOS应用程序,但不允许iPad兼容?
- 14. iPhone App Store Like App Store
- 15. 如何使用SSZIPArchive
- 16. 允许引用斜杠的JSON库吗?
- 17. Yahoo!天气XML Feed允许在iPhone App中使用?
- 18. 它允许生成临时文件吗?
- 19. 它允许更改UISearchBar的背景吗?
- 20. Mac App Store沙盒和只读SQLite数据库在.APP包中
- 21. 我仍然可以在开发iPod Touch上使用App Store吗?
- 22. 允许Three20吗?
- 23. 在App Store中搜索
- 24. 它允许使用VkBool32作为推常量吗?
- 25. 接收在App Store
- 26. 应用内购买可以在App Store中“有天赋”吗?
- 27. 可以在iTunes App Store中看到Custom B2B应用程序吗?
- 28. Mac App Store + Silverlight退出浏览器,它可以工作吗?
- 29. iPhone sdk:它允许在uiview中有两个广告横幅吗?
- 30. 它允许在Spring服务中有实例变量吗?
你问关于使用密码保护的zip文件,或者你真的只需要一个普通的旧zip /解压缩库? – rmaddy 2013-03-06 00:00:11
对不起,如果我不清楚,我只想压缩/解压缩,不需要/想要加密 – aprunedamtz 2013-03-06 22:18:04
尝试Objective-Zip,ZipKit或普通的旧的minizip。 – rmaddy 2013-03-06 22:45:19