Modern Apps git

← xtool.git

Improve indeterminate progress handling

Commit
5f36501cd0c9670ae6d6d892032c22bf3e235e49
Author
Kabir Oberai <[email protected]>
When
2022-08-20 19:00 UTC (4 years ago)
Parents
a4a73cd

Diff

Supersign/Sources/Supersign/Signer/Signer.swift
diff --git a/Supersign/Sources/Supersign/Signer/Signer.swift b/Supersign/Sources/Supersign/Signer/Signer.swiftindex 602b54c..6144be6 100644--- a/Supersign/Sources/Supersign/Signer/Signer.swift+++ b/Supersign/Sources/Supersign/Signer/Signer.swift@@ -54,7 +54,7 @@ public struct Signer {         signingInfo: SigningInfo,         provisioningDict: [URL: ProvisioningInfo],         status: @escaping (String) -> Void,-        progress: @escaping (Double) -> Void,+        progress: @escaping (Double?) -> Void,         didProvision: @escaping () throws -> Void,         completion: @escaping (Result<(), Swift.Error>) -> Void     ) {@@ -102,7 +102,7 @@ public struct Signer {     public func sign(         app: URL,         status: @escaping (String) -> Void,-        progress: @escaping (Double) -> Void,+        progress: @escaping (Double?) -> Void,         didProvision: @escaping () throws -> Void = {},         completion: @escaping (Result<String, Swift.Error>) -> Void     ) {
Supersign/Sources/Supersign/Signer/SignerImpl.swift
diff --git a/Supersign/Sources/Supersign/Signer/SignerImpl.swift b/Supersign/Sources/Supersign/Signer/SignerImpl.swiftindex 8410509..cef09fd 100644--- a/Supersign/Sources/Supersign/Signer/SignerImpl.swift+++ b/Supersign/Sources/Supersign/Signer/SignerImpl.swift@@ -71,7 +71,7 @@ public struct SignerImpl {         certificate: Certificate,         privateKey: PrivateKey,         entitlementMapping: [URL: Entitlements],-        progress: @escaping (Double) -> Void+        progress: @escaping (Double?) -> Void     ) throws {         let encoder = PropertyListEncoder()         encoder.outputFormat = .xml@@ -116,8 +116,8 @@ public struct SignerImpl {                         (Unmanaged<AnyObject>                             .fromOpaque($0)                             .takeUnretainedValue()-                         as! (Double) -> Void-                        )($1)+                         as! (Double?) -> Void+                        )($1 == -1 ? nil : $1)                     },                     box.toOpaque(),                     &exception@@ -133,7 +133,7 @@ public struct SignerImpl {         certificate: Certificate,         privateKey: PrivateKey,         entitlementMapping: [URL: Entitlements],-        progress: @escaping (Double) -> Void,+        progress: @escaping (Double?) -> Void,         completion: @escaping (Result<(), Swift.Error>) -> Void     ) {         Self.signingQueue.async {