@capgo/capacitor-updater 3.3.17 → 3.3.20

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.
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # capacitor-updater
2
-
1
+ # Capacitor updater
2
+ <a href="https://capgo.app/"><img src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' alt='Capgo - Instant updates for capacitor'/></a>
3
3
  Update capacitor app without store review.
4
4
 
5
5
  You have 3 ways possible :
@@ -12,7 +12,7 @@ You have 3 ways possible :
12
12
  Join the [discord](https://discord.gg/VnYRvBfgA6) to get help.
13
13
 
14
14
  ## Documentation
15
- I maintain a more user friendly and complete [documentation](https://github.com/Cap-go/capacitor-updater/wiki) in GitHub wiki.
15
+ I maintain a more user friendly and complete [documentation here](https://docs.capgo.app/).
16
16
 
17
17
  ## install plugin
18
18
 
@@ -53,7 +53,7 @@ Create account in [capgo.app](https://capgo.app) and get your [API key](https://
53
53
  - If update fail it will roolback to previous version.
54
54
 
55
55
  See more there in the [Auto update](
56
- https://github.com/Cap-go/capacitor-updater/wiki) documentation.
56
+ https://docs.capgo.app/plugin/auto-update/cloud) documentation.
57
57
 
58
58
 
59
59
  ## Manual setup
@@ -59,7 +59,7 @@ public class CapacitorUpdater {
59
59
 
60
60
  public String appId = "";
61
61
  public String deviceID = "";
62
- public final String pluginVersion = "3.3.17";
62
+ public final String pluginVersion = "3.3.20";
63
63
  public String statsUrl = "";
64
64
 
65
65
  public CapacitorUpdater (final Context context) throws PackageManager.NameNotFoundException {
@@ -28,10 +28,10 @@ extension OperatingSystemVersion {
28
28
  }
29
29
  }
30
30
  extension Bundle {
31
- var releaseVersionNumber: String? {
31
+ var versionName: String? {
32
32
  return infoDictionary?["CFBundleShortVersionString"] as? String
33
33
  }
34
- var buildVersionNumber: String? {
34
+ var versionCode: String? {
35
35
  return infoDictionary?["CFBundleVersion"] as? String
36
36
  }
37
37
  }
@@ -63,8 +63,8 @@ extension CustomError: LocalizedError {
63
63
 
64
64
  @objc public class CapacitorUpdater: NSObject {
65
65
 
66
- private var versionBuild = Bundle.main.releaseVersionNumber ?? ""
67
- private var versionCode = Bundle.main.buildVersionNumber ?? ""
66
+ private var versionBuild = Bundle.main.versionName ?? ""
67
+ private var versionCode = Bundle.main.versionCode ?? ""
68
68
  private var versionOs = ProcessInfo().operatingSystemVersion.getFullVersion()
69
69
  private var lastPathHot = ""
70
70
  private var lastPathPersist = ""
@@ -19,7 +19,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
19
19
 
20
20
  override public func load() {
21
21
  do {
22
- currentVersionNative = try Version(Bundle.main.buildVersionNumber ?? "0.0.0")
22
+ currentVersionNative = try Version(Bundle.main.versionName ?? "0.0.0")
23
23
  } catch {
24
24
  print("✨ Capacitor-updater: Cannot get version native \(currentVersionNative)")
25
25
  }
@@ -49,7 +49,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
49
49
  _ = implementation.delete(version: version, versionName: "")
50
50
  }
51
51
  }
52
- UserDefaults.standard.set( Bundle.main.buildVersionNumber, forKey: "LatestVersionNative")
52
+ UserDefaults.standard.set( Bundle.main.versionName, forKey: "LatestVersionNative")
53
53
  }
54
54
  if (!autoUpdate || autoUpdateUrl == "") { return }
55
55
  let nc = NotificationCenter.default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "3.3.17",
3
+ "version": "3.3.20",
4
4
  "license": "LGPL-3.0-only",
5
5
  "description": "OTA update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",