Skip to content

Commit

Permalink
fix: download missign methods calls
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed May 20, 2022
1 parent c98ba70 commit 719d2f5
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ios/Plugin/CapacitorUpdater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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] {
Expand Down

0 comments on commit 719d2f5

Please sign in to comment.