@capgo/capacitor-updater 5.7.13 → 5.7.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
55
55
  private static final String channelUrlDefault =
56
56
  "https://api.capgo.app/channel_self";
57
57
 
58
- private final String PLUGIN_VERSION = "5.7.13";
58
+ private final String PLUGIN_VERSION = "5.7.14";
59
59
  private static final String DELAY_CONDITION_PREFERENCES = "";
60
60
 
61
61
  private SharedPreferences.Editor editor;
@@ -15,7 +15,7 @@ import Version
15
15
  @objc(CapacitorUpdaterPlugin)
16
16
  public class CapacitorUpdaterPlugin: CAPPlugin {
17
17
  public var implementation = CapacitorUpdater()
18
- private let PLUGIN_VERSION: String = "5.7.13"
18
+ private let PLUGIN_VERSION: String = "5.7.14"
19
19
  static let updateUrlDefault = "https://api.capgo.app/updates"
20
20
  static let statsUrlDefault = "https://api.capgo.app/stats"
21
21
  static let channelUrlDefault = "https://api.capgo.app/channel_self"
@@ -792,12 +792,14 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
792
792
  return
793
793
  }
794
794
  let timer = Timer.scheduledTimer(withTimeInterval: TimeInterval(periodCheckDelay), repeats: true) { _ in
795
- let res = self.implementation.getLatest(url: url)
796
- let current = self.implementation.getCurrentBundle()
795
+ DispatchQueue.global(qos: .background).async {
796
+ let res = self.implementation.getLatest(url: url)
797
+ let current = self.implementation.getCurrentBundle()
797
798
 
798
- if res.version != current.getVersionName() {
799
- print("\(self.implementation.TAG) New version found: \(res.version)")
800
- self.backgroundDownload()
799
+ if res.version != current.getVersionName() {
800
+ print("\(self.implementation.TAG) New version found: \(res.version)")
801
+ self.backgroundDownload()
802
+ }
801
803
  }
802
804
  }
803
805
  RunLoop.current.add(timer, forMode: .default)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "5.7.13",
3
+ "version": "5.7.14",
4
4
  "packageManager": "pnpm@8.15.4",
5
5
  "license": "MPL-2.0",
6
6
  "description": "Live update for capacitor apps",