@capawesome/capacitor-live-update 8.0.0 → 8.1.0

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.
@@ -11,10 +11,10 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '16.0'
14
+ s.ios.deployment_target = '15.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.dependency 'Alamofire', '~> 5.10.2'
17
- s.dependency 'SSZipArchive', '~> 2.6.0'
17
+ s.dependency 'ZIPFoundation', '~> 0.9.0'
18
18
  s.swift_version = '5.1'
19
19
  s.static_framework = true
20
20
  end
package/Package.swift CHANGED
@@ -3,7 +3,7 @@ import PackageDescription
3
3
 
4
4
  let package = Package(
5
5
  name: "CapawesomeCapacitorLiveUpdate",
6
- platforms: [.iOS(.v16)],
6
+ platforms: [.iOS(.v15)],
7
7
  products: [
8
8
  .library(
9
9
  name: "CapawesomeCapacitorLiveUpdate",
@@ -12,7 +12,7 @@ let package = Package(
12
12
  dependencies: [
13
13
  .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
14
14
  .package(url: "https://github.com/Alamofire/Alamofire.git", .upToNextMinor(from: "5.10.2")),
15
- .package(url: "https://github.com/ZipArchive/ZipArchive.git", .upToNextMinor(from: "2.6.0"))
15
+ .package(url: "https://github.com/weichsel/ZIPFoundation.git", .upToNextMinor(from: "0.9.0"))
16
16
  ],
17
17
  targets: [
18
18
  .target(
@@ -21,7 +21,7 @@ let package = Package(
21
21
  .product(name: "Capacitor", package: "capacitor-swift-pm"),
22
22
  .product(name: "Cordova", package: "capacitor-swift-pm"),
23
23
  .product(name: "Alamofire", package: "Alamofire"),
24
- .product(name: "ZipArchive", package: "ZipArchive")
24
+ .product(name: "ZIPFoundation", package: "ZIPFoundation")
25
25
  ],
26
26
  path: "ios/Plugin"),
27
27
  .testTarget(
package/README.md CHANGED
@@ -93,21 +93,6 @@ Add the `NSPrivacyAccessedAPICategoryUserDefaults` dictionary key to your [Priva
93
93
 
94
94
  We recommend to declare [`CA92.1`](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401) as the reason for accessing the [`UserDefaults`](https://developer.apple.com/documentation/foundation/userdefaults) API.
95
95
 
96
- #### Minimum Deployment Target
97
-
98
- If you are using **Swift Package Manager**, make sure that your iOS deployment target is set to at least `16.0` in your Xcode project settings (usually in `ios/App/App.xcodeproj`):
99
-
100
- ```diff
101
- -IPHONEOS_DEPLOYMENT_TARGET = 15.0
102
- +IPHONEOS_DEPLOYMENT_TARGET = 16.0
103
- ```
104
-
105
- If you are using **CocoaPods**, make sure that your iOS deployment target is set to at least `16.0` in your `Podfile`:
106
-
107
- ```ruby
108
- platform :ios, '16.0'
109
- ```
110
-
111
96
  ## Configuration
112
97
 
113
98
  <docgen-config>
@@ -35,7 +35,7 @@ import io.capawesome.capacitorjs.plugins.liveupdate.interfaces.Result;
35
35
  public class LiveUpdatePlugin extends Plugin {
36
36
 
37
37
  public static final String TAG = "LiveUpdate";
38
- public static final String VERSION = "7.4.0";
38
+ public static final String VERSION = "8.1.0";
39
39
  public static final String SHARED_PREFERENCES_NAME = "CapawesomeLiveUpdate"; // DO NOT CHANGE
40
40
  public static final String ERROR_APP_ID_MISSING = "appId must be configured.";
41
41
  public static final String ERROR_BUNDLE_EXISTS = "bundle already exists.";
@@ -1,10 +1,6 @@
1
1
  import Foundation
2
2
  import CryptoKit
3
- #if canImport(ZipArchive)
4
- import ZipArchive
5
- #else
6
- import SSZipArchive
7
- #endif
3
+ import ZIPFoundation
8
4
  import Capacitor
9
5
  import Alamofire
10
6
  import CommonCrypto
@@ -323,7 +319,7 @@ import CommonCrypto
323
319
 
324
320
  private func addBundleOfTypeZip(bundleId: String, zipFile: URL) async throws {
325
321
  // Unzip the bundle
326
- let unzippedDirectory = self.unzipFile(zipFile: zipFile)
322
+ let unzippedDirectory = try self.unzipFile(zipFile: zipFile)
327
323
  // Add the bundle
328
324
  try self.addBundle(bundleId: bundleId, directory: unzippedDirectory)
329
325
  }
@@ -923,9 +919,10 @@ import CommonCrypto
923
919
  }
924
920
  }
925
921
 
926
- private func unzipFile(zipFile: URL) -> URL {
922
+ private func unzipFile(zipFile: URL) throws -> URL {
927
923
  let destinationDirectory = zipFile.deletingPathExtension()
928
- SSZipArchive.unzipFile(atPath: zipFile.path, toDestination: destinationDirectory.path)
924
+ try FileManager.default.createDirectory(at: destinationDirectory, withIntermediateDirectories: true, attributes: nil)
925
+ try FileManager.default.unzipItem(at: zipFile, to: destinationDirectory)
929
926
  return destinationDirectory
930
927
  }
931
928
 
@@ -8,7 +8,7 @@ import Capacitor
8
8
  @objc(LiveUpdatePlugin)
9
9
  public class LiveUpdatePlugin: CAPPlugin, CAPBridgedPlugin {
10
10
  public static let tag = "LiveUpdate"
11
- public static let version = "7.4.0"
11
+ public static let version = "8.1.0"
12
12
  public static let userDefaultsPrefix = "CapawesomeLiveUpdate" // DO NOT CHANGE
13
13
 
14
14
  public let identifier = "LiveUpdatePlugin"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capawesome/capacitor-live-update",
3
- "version": "8.0.0",
3
+ "version": "8.1.0",
4
4
  "description": "Capacitor plugin to update your app remotely in real-time.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",