@capgo/capacitor-updater 8.4.1 → 8.4.3
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/android/src/main/java/ee/forgr/capacitor_updater/CapacitorUpdaterPlugin.java +1 -4
- package/android/src/main/java/ee/forgr/capacitor_updater/DeviceIdHelper.java +0 -6
- package/ios/Sources/CapacitorUpdaterPlugin/CapacitorUpdaterPlugin.swift +1 -1
- package/ios/Sources/CapacitorUpdaterPlugin/CryptoCipher.swift +1 -5
- package/package.json +1 -1
|
@@ -85,7 +85,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
85
85
|
private static final String[] BREAKING_EVENT_NAMES = { "breakingAvailable", "majorAvailable" };
|
|
86
86
|
private static final String LAST_FAILED_BUNDLE_PREF_KEY = "CapacitorUpdater.lastFailedBundle";
|
|
87
87
|
|
|
88
|
-
private final String pluginVersion = "8.4.
|
|
88
|
+
private final String pluginVersion = "8.4.3";
|
|
89
89
|
private static final String DELAY_CONDITION_PREFERENCES = "";
|
|
90
90
|
|
|
91
91
|
private SharedPreferences.Editor editor;
|
|
@@ -2130,9 +2130,6 @@ public class CapacitorUpdaterPlugin extends Plugin {
|
|
|
2130
2130
|
}
|
|
2131
2131
|
|
|
2132
2132
|
private boolean isMainActivity() {
|
|
2133
|
-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
|
2134
|
-
return false;
|
|
2135
|
-
}
|
|
2136
2133
|
try {
|
|
2137
2134
|
Context mContext = this.getContext();
|
|
2138
2135
|
ActivityManager activityManager = (ActivityManager) mContext.getSystemService(Context.ACTIVITY_SERVICE);
|
|
@@ -8,7 +8,6 @@ package ee.forgr.capacitor_updater;
|
|
|
8
8
|
|
|
9
9
|
import android.content.Context;
|
|
10
10
|
import android.content.SharedPreferences;
|
|
11
|
-
import android.os.Build;
|
|
12
11
|
import android.security.keystore.KeyGenParameterSpec;
|
|
13
12
|
import android.security.keystore.KeyProperties;
|
|
14
13
|
import java.io.IOException;
|
|
@@ -56,11 +55,6 @@ public class DeviceIdHelper {
|
|
|
56
55
|
* @return Device ID as a lowercase UUID string
|
|
57
56
|
*/
|
|
58
57
|
public static String getOrCreateDeviceId(Context context, SharedPreferences legacyPrefs) {
|
|
59
|
-
// API 23+ required for Android Keystore
|
|
60
|
-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
|
|
61
|
-
return getFallbackDeviceId(legacyPrefs);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
58
|
try {
|
|
65
59
|
// Try to get device ID from Keystore storage
|
|
66
60
|
String deviceId = getDeviceIdFromKeystore(context);
|
|
@@ -60,7 +60,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
|
|
|
60
60
|
CAPPluginMethod(name: "completeFlexibleUpdate", returnType: CAPPluginReturnPromise)
|
|
61
61
|
]
|
|
62
62
|
public var implementation = CapgoUpdater()
|
|
63
|
-
private let pluginVersion: String = "8.4.
|
|
63
|
+
private let pluginVersion: String = "8.4.3"
|
|
64
64
|
static let updateUrlDefault = "https://plugin.capgo.app/updates"
|
|
65
65
|
static let statsUrlDefault = "https://plugin.capgo.app/stats"
|
|
66
66
|
static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
|
|
@@ -151,11 +151,7 @@ public struct CryptoCipher {
|
|
|
151
151
|
while autoreleasepool(invoking: {
|
|
152
152
|
let fileData: Data
|
|
153
153
|
do {
|
|
154
|
-
|
|
155
|
-
fileData = try fileHandle.read(upToCount: bufferSize) ?? Data()
|
|
156
|
-
} else {
|
|
157
|
-
fileData = fileHandle.readData(ofLength: bufferSize)
|
|
158
|
-
}
|
|
154
|
+
fileData = try fileHandle.read(upToCount: bufferSize) ?? Data()
|
|
159
155
|
} catch {
|
|
160
156
|
logger.error("Error reading file: \(error)")
|
|
161
157
|
return false
|