- SSZipArchive出现的"failed to open z
- SSZipArchive 解压提示 failed to open
- Android Studio出现Failed to open z
- Android Studio出现Failed to open z
- Failed to open TCP connection to
- 解决Android Studio出现Failed to open
- php 中 文件写入权限问题
- git运行报错fatal: open /dev/null or
- Android清单权限和动态权限都设置了但是还是出现了open
- Could not read input channel fil
iOS开发中解压缩文件我使用第三方SSZipArchive。 我的zip包是从后台服务器直接下载的。下载好就直接解压缩了 问题就出现在这里了 看如下代码


而后我在unzipFileWithPath
方法实现中添加了延迟
具体实现如下
DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.5) {
let unzipState = SSZipArchive.unzipFile(atPath: url.path, toDestination: self.tempUnzipPath(), preserveAttributes: true, overwrite: true, nestedZipLevel: 1, password: nil, error: nil, delegate: nil, progressHandler: { (_, _, currentCount, totalCount) in
let p:Float = (Float(currentCount) / Float(totalCount))
consoleLine(message: p)
SVProgressHUD.showProgress(p, status: "解压中...")
}) { (filePath, isSuccess, error) in
consoleLine(message: filePath)
consoleLine(message: isSuccess)
consoleLine(message: error)
SVProgressHUD.dismiss()
}
}
问题解决了。 坑的是我在github和stackoverflow都说是路径问题。而后找做小程序的同事咨询下,一下子就解决了。"因为小程序是把 h5内容包下载到本地的" 这里简单记录下。
网友评论