Skip to content

Commit

Permalink
fix: error in ios missing code disableAutoUpdateUnderNative
Browse files Browse the repository at this point in the history
  • Loading branch information
riderx committed Mar 28, 2022
1 parent 99968c5 commit c889b76
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 @@ -180,10 +180,10 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
let failingVersion = UserDefaults.standard.string(forKey: "failingVersion") ?? ""
let newVersion: Version = res?.version ?? ""
let currentVersionNative: Version = Bundle.main.buildVersionNumber
if (newVersion < currentVersionNative) {
if (disableAutoUpdateUnderNative && newVersion < currentVersionNative) {
print("✨ Capacitor-updater: Cannot download revert, \(newVersion) is lest than native version \(currentVersionNative)")
}
else if () {
else if (disableAutoUpdateToMajor && newVersion.major > currentVersionNative.major) {
print("✨ Capacitor-updater: Cannot download Major, \(newVersion) is Breaking change from \(currentVersion)")
}
else if (newVersion != "" && newVersion != currentVersion && newVersion != failingVersion) {
Expand Down

0 comments on commit c889b76

Please sign in to comment.