0
              _ = 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)
                }

            })

输入 downloadPath.url 而不是 downloadPath.absoluteString 但不起作用。这在模拟器上运行良好,在设备上运行时出现错误。

错误来自完成处理程序

4

0 回答 0