From 719d2f5dd5f8f43803ac4afe22ad98a75968a0d4 Mon Sep 17 00:00:00 2001 From: martindonadieu Date: Fri, 20 May 2022 14:09:38 +0100 Subject: [PATCH] fix: download missign methods calls --- ios/Plugin/CapacitorUpdater.swift | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ios/Plugin/CapacitorUpdater.swift b/ios/Plugin/CapacitorUpdater.swift index ea3feb6d..b96d3eff 100644 --- a/ios/Plugin/CapacitorUpdater.swift +++ b/ios/Plugin/CapacitorUpdater.swift @@ -253,9 +253,9 @@ extension CustomError: LocalizedError { version = self.randomString(length: 10) do { try self.saveDownloaded(sourceZip: fileURL, version: version, base: self.documentsDir.appendingPathComponent(self.bundleDirectoryHot)) - self.notifyDownload(85); + self.notifyDownload(85) try self.saveDownloaded(sourceZip: fileURL, version: version, base: self.libraryDir.appendingPathComponent(self.bundleDirectory)) - self.notifyDownload(100); + self.notifyDownload(100) self.deleteFolder(source: fileURL) } catch { print("\(self.TAG) download unzip error", error) @@ -268,12 +268,15 @@ extension CustomError: LocalizedError { } semaphore.signal() } - self.notifyDownload(0); + self.notifyDownload(0) semaphore.wait() if (mainError != nil) { throw mainError! } - return version + self.setVersionStatus(version, VersionStatus.PENDING) + self.setVersionDownloadedTimestamp(version, Date()) + self.setVersionName(version, versionName) + return self.getVersionInfo(version) } public func list() -> [String] {