Skip to content

Commit

Permalink
fix: auto update
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Jun 27, 2022
1 parent e6fd0f2 commit d170455
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/Plugin/CapacitorUpdaterPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
}
if(latest!.isDownloaded()){
print("\(self.implementation.TAG) Latest version already exists and download is NOT required. Update will occur next time app moves to background.")
let _ = self.implementation.setNextVersion(next: latest!.getVersionName())
let _ = self.implementation.setNextVersion(next: latest!.getFolder())
return
}
}
Expand All @@ -325,7 +325,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
print("\(self.implementation.TAG) New version: \(latestVersionName!) found. Current is: \(current.getVersionName()). Update will occur next time app moves to background.")
let next = try self.implementation.download(url: downloadUrl, versionName: latestVersionName!)

let _ = self.implementation.setNextVersion(next: next.getVersionName())
let _ = self.implementation.setNextVersion(next: next.getFolder())

self.notifyListeners("updateAvailable", data: [
"versionName": next.getVersionName()
Expand Down

0 comments on commit d170455

Please sign in to comment.