From a004f928cd19b443999537d19c68fdeb0dfdf94c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20C=C5=93ur?= Date: Tue, 12 Sep 2017 21:44:47 +0800 Subject: [PATCH] also printing error for Swift example project --- SwiftExample/SwiftExample/ViewController.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/SwiftExample/SwiftExample/ViewController.swift b/SwiftExample/SwiftExample/ViewController.swift index 10c1b48..7fa3e13 100644 --- a/SwiftExample/SwiftExample/ViewController.swift +++ b/SwiftExample/SwiftExample/ViewController.swift @@ -52,6 +52,8 @@ class ViewController: UIViewController { if success { unzipButton.isEnabled = true zipButton.isEnabled = false + } else { + print("No success") } resetButton.isEnabled = true } @@ -66,7 +68,10 @@ class ViewController: UIViewController { } let password = passwordField.text - let success: Void? = try? SSZipArchive.unzipFile(atPath: zipPath, toDestination: unzipPath, overwrite: true, password: password?.isEmpty == false ? password : nil) + let success: Void? = try? SSZipArchive.unzipFile(atPath: zipPath, + toDestination: unzipPath, + overwrite: true, + password: password?.isEmpty == false ? password : nil) if success == nil { print("No success") return @@ -123,7 +128,6 @@ class ViewController: UIViewController { return nil } - return url.path }