I am generating zip file of my data which is in document directory, the problem is that Its working well with iphone simulator but same coding is not working for iphone actual device which is phone 5
Here is my code snippet
ZipArchive *archiver = [[ZipArchive alloc] init];
[archiver CreateZipFile2:archivePath];
for(NSString *path in subpaths)
{
NSString *longPath = [exportPath stringByAppendingPathComponent:path];
if([fileManager fileExistsAtPath:longPath isDirectory:&isDir] && !isDir)
{
[archiver CreateZipFile2:longPath];
[archiver addFileToZip:longPath newname:path];
}
}
BOOL successCompressing = [archiver CloseZipFile2];
I tried to googled but its not giving any help Please guide me Thanks
Try this one:
Make sure you have write this line:NSFileManager *fileManager = [NSFileManager defaultManager];