0

I have to zipped an encrypted file by using many zipped pod file like ZipArchive ,SSZipArchive etc.The simple sqlite file has been zipped by using ZipArchive but the file that is encrypted using SQLCipher has not been zipped i dont know why can anyone tell me here is my code

Code

NSArray* path = 
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString* datbasePath = [path objectAtIndex:0];
NSString* sqlitePath = [datbasePath stringByAppendingPathComponent:@"abc.sqlite"];
NSString* zipPath = [datbasePath stringByAppendingPathComponent:@"abc.zip"];
ZipArchive* zip = [[ZipArchive alloc] init];
BOOL ret = [zip CreateZipFile2:zipPath];
ret = [zip addFileToZip:sqlitePath newname:@"abc.sqlite"];
testing
  • 91
  • 1
  • 7
  • Code looks ok, not entirely sure about the zipping. Do you not need to close or end or fin the zip somewhere? But my first question here is - are you sure those files you want to zip actually exist? – skaak Oct 22 '20 at 15:35
  • yes.Work done reason behind is that file is encrypted – testing Dec 08 '20 at 11:50

0 Answers0