@capgo/capacitor-updater 6.43.3 → 6.43.4

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.
@@ -84,7 +84,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
84
84
  private static final String[] BREAKING_EVENT_NAMES = { "breakingAvailable", "majorAvailable" };
85
85
  private static final String LAST_FAILED_BUNDLE_PREF_KEY = "CapacitorUpdater.lastFailedBundle";
86
86
 
87
- private final String pluginVersion = "7.43.3";
87
+ private final String pluginVersion = "6.43.4";
88
88
  private static final String DELAY_CONDITION_PREFERENCES = "";
89
89
 
90
90
  private SharedPreferences.Editor editor;
@@ -73,7 +73,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin, CAPBridgedPlugin {
73
73
  CAPPluginMethod(name: "completeFlexibleUpdate", returnType: CAPPluginReturnPromise)
74
74
  ]
75
75
  public var implementation = CapgoUpdater()
76
- private let pluginVersion: String = "7.43.3"
76
+ private let pluginVersion: String = "6.43.4"
77
77
  static let updateUrlDefault = "https://plugin.capgo.app/updates"
78
78
  static let statsUrlDefault = "https://plugin.capgo.app/stats"
79
79
  static let channelUrlDefault = "https://plugin.capgo.app/channel_self"
@@ -167,12 +167,16 @@ public struct CryptoCipher {
167
167
 
168
168
  while autoreleasepool(invoking: {
169
169
  let fileData: Data
170
- do {
171
- fileData = try fileHandle.read(upToCount: bufferSize) ?? Data()
172
- } catch {
173
- logger.error("Error reading file during checksum")
174
- logger.debug("Error: \(error)")
175
- return false
170
+ if #available(iOS 13.4, *) {
171
+ do {
172
+ fileData = try fileHandle.read(upToCount: bufferSize) ?? Data()
173
+ } catch {
174
+ logger.error("Error reading file during checksum")
175
+ logger.debug("Error: \(error)")
176
+ return false
177
+ }
178
+ } else {
179
+ fileData = fileHandle.readData(ofLength: bufferSize)
176
180
  }
177
181
 
178
182
  if fileData.count > 0 {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "6.43.3",
3
+ "version": "6.43.4",
4
4
  "license": "MPL-2.0",
5
5
  "description": "Live update for capacitor apps",
6
6
  "main": "dist/plugin.cjs.js",
@@ -42,7 +42,7 @@
42
42
  ],
43
43
  "scripts": {
44
44
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
45
- "verify:ios": "xcodebuild -scheme CapgoCapacitorUpdater -destination generic/platform=iOS",
45
+ "verify:ios": "TMP_DERIVED_DATA=$(mktemp -d \"${TMPDIR:-/tmp}/capgo-updater-ios-verify.XXXXXX\") && xcodebuild -scheme CapgoCapacitorUpdater -destination generic/platform=iOS -derivedDataPath \"$TMP_DERIVED_DATA\" SWIFT_ENABLE_EXPLICIT_MODULES=NO; EXIT_CODE=$?; rm -rf \"$TMP_DERIVED_DATA\"; exit $EXIT_CODE",
46
46
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
47
47
  "verify:web": "npm run build",
48
48
  "test": "npm run test:ios && npm run test:android",