diff --git a/bun.lockb b/bun.lockb index e4217596..e89f6f2d 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/ios/Plugin/CapacitorUpdater.swift b/ios/Plugin/CapacitorUpdater.swift index 09d1c1b0..b2762f47 100644 --- a/ios/Plugin/CapacitorUpdater.swift +++ b/ios/Plugin/CapacitorUpdater.swift @@ -979,7 +979,7 @@ extension CustomError: LocalizedError { let finalPath = tempDataPath.deletingLastPathComponent().appendingPathComponent("\(id)") do { var checksumDecrypted = checksum - if !self.hasOldPrivateKeyPropertyInConfig && !sessionKey.isEmpty { + if !self.hasOldPrivateKeyPropertyInConfig { try self.decryptFileV2(filePath: tempDataPath, sessionKey: sessionKey, version: version) } else { try self.decryptFile(filePath: tempDataPath, sessionKey: sessionKey, version: version) diff --git a/ios/Plugin/CapacitorUpdaterPlugin.swift b/ios/Plugin/CapacitorUpdaterPlugin.swift index e81d90c2..3611bbc7 100644 --- a/ios/Plugin/CapacitorUpdaterPlugin.swift +++ b/ios/Plugin/CapacitorUpdaterPlugin.swift @@ -291,7 +291,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin { DispatchQueue.global(qos: .background).async { do { let next = try self.implementation.download(url: url!, version: version, sessionKey: sessionKey) - if !self.implementation.hasOldPrivateKeyPropertyInConfig && !sessionKey.isEmpty { + if !self.implementation.hasOldPrivateKeyPropertyInConfig { checksum = try self.implementation.decryptChecksum(checksum: checksum, version: version) } if (checksum != "" || self.implementation.publicKey != "") && next.getChecksum() != checksum { @@ -775,7 +775,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin { self.endBackGroundTaskWithNotif(msg: "Latest version is in error state. Aborting update.", latestVersionName: latestVersionName, current: current) return } - if !self.implementation.hasOldPrivateKeyPropertyInConfig && !sessionKey.isEmpty { + if !self.implementation.hasOldPrivateKeyPropertyInConfig { res.checksum = try self.implementation.decryptChecksum(checksum: res.checksum, version: latestVersionName) } if res.checksum != "" && next.getChecksum() != res.checksum && res.manifest == nil {