@capgo/capacitor-updater 4.0.0-alpha.47 → 4.0.0-alpha.48
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.
|
@@ -47,7 +47,7 @@ public class CapacitorUpdater {
|
|
|
47
47
|
private static final String bundleDirectory = "versions";
|
|
48
48
|
|
|
49
49
|
public static final String TAG = "Capacitor-updater";
|
|
50
|
-
public static final String pluginVersion = "4.0.0-alpha.
|
|
50
|
+
public static final String pluginVersion = "4.0.0-alpha.48";
|
|
51
51
|
|
|
52
52
|
public SharedPreferences.Editor editor;
|
|
53
53
|
public SharedPreferences prefs;
|
|
@@ -132,8 +132,8 @@ extension CustomError: LocalizedError {
|
|
|
132
132
|
|
|
133
133
|
@objc public class CapacitorUpdater: NSObject {
|
|
134
134
|
|
|
135
|
-
private let
|
|
136
|
-
private let versionCode = Bundle.main.
|
|
135
|
+
private let versionName = Bundle.main.versionName ?? ""
|
|
136
|
+
private let versionCode = Bundle.main.versionCode ?? ""
|
|
137
137
|
private let versionOs = ProcessInfo().operatingSystemVersion.getFullVersion()
|
|
138
138
|
private let documentsDir = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask).first!
|
|
139
139
|
private let libraryDir = FileManager.default.urls(for: .libraryDirectory, in: .userDomainMask).first!
|
|
@@ -146,7 +146,7 @@ extension CustomError: LocalizedError {
|
|
|
146
146
|
|
|
147
147
|
public let TAG = "✨ Capacitor-updater:";
|
|
148
148
|
public let CAP_SERVER_PATH = "serverBasePath"
|
|
149
|
-
public let pluginVersion = "4.0.0-alpha.
|
|
149
|
+
public let pluginVersion = "4.0.0-alpha.48"
|
|
150
150
|
public var statsUrl = ""
|
|
151
151
|
public var appId = ""
|
|
152
152
|
public var deviceID = UIDevice.current.identifierForVendor?.uuidString ?? ""
|
|
@@ -233,7 +233,7 @@ extension CustomError: LocalizedError {
|
|
|
233
233
|
"platform": "ios",
|
|
234
234
|
"device_id": self.deviceID,
|
|
235
235
|
"app_id": self.appId,
|
|
236
|
-
"version_build": self.
|
|
236
|
+
"version_build": self.versionName,
|
|
237
237
|
"version_code": self.versionCode,
|
|
238
238
|
"version_os": self.versionOs,
|
|
239
239
|
"plugin_version": self.pluginVersion,
|
|
@@ -395,7 +395,7 @@ extension CustomError: LocalizedError {
|
|
|
395
395
|
return true
|
|
396
396
|
}
|
|
397
397
|
if (bundleExists(id: id)) {
|
|
398
|
-
self.setCurrentBundle(bundle: self.getBundleDirectory(id: id))
|
|
398
|
+
self.setCurrentBundle(bundle: self.getBundleDirectory(id: id).path)
|
|
399
399
|
self.setBundleStatus(id: id, status: BundleStatus.PENDING)
|
|
400
400
|
sendStats(action: "set", versionName: newBundle.getVersionName())
|
|
401
401
|
return true
|
|
@@ -453,7 +453,7 @@ extension CustomError: LocalizedError {
|
|
|
453
453
|
"action": action,
|
|
454
454
|
"device_id": self.deviceID,
|
|
455
455
|
"version_name": versionName,
|
|
456
|
-
"version_build": self.
|
|
456
|
+
"version_build": self.versionName,
|
|
457
457
|
"version_code": self.versionCode,
|
|
458
458
|
"version_os": self.versionOs,
|
|
459
459
|
"plugin_version": self.pluginVersion,
|