Reputation: 77
_ = try? SSZipArchive.unzipFile(atPath: filePath, toDestination: downloadPath.absoluteString!, overwrite: true, password: nil, progressHandler: { log, info, count, total in
print("file",log)
print("info", info)
print("first", count)
print("second", total)
}, completionHandler: { zipPath,success,error in
if success == true {
print(zipPath)
let filePaths = FileManager.default.urls(for: URL(string: downloadPath.absoluteString!)! )
completionHandler(true, filePaths)
} else {
print(error)
}
})
Entered downloadPath.url instead of downloadPath.absoluteString but not working. This works fine on simulator, error comes when it's running on device.
ERROR COMES FROM COMPLETIONHANDLER
Upvotes: 1
Views: 408