@capgo/capacitor-updater 6.0.8 → 6.0.14

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
@@ -31,6 +31,35 @@ Join the [discord](https://discord.gg/VnYRvBfgA6) to get help.
31
31
  ## Documentation
32
32
  I maintain a more user-friendly and complete [documentation here](https://capgo.app/docs/).
33
33
 
34
+ ### iOS
35
+
36
+ #### Privacy manifest
37
+
38
+ Add the `NSPrivacyAccessedAPICategoryUserDefaults` dictionary key to your [Privacy Manifest](https://capacitorjs.com/docs/ios/privacy-manifest) (usually `ios/App/PrivacyInfo.xcprivacy`):
39
+
40
+ ```xml
41
+ <?xml version="1.0" encoding="UTF-8"?>
42
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
43
+ <plist version="1.0">
44
+ <dict>
45
+ <key>NSPrivacyAccessedAPITypes</key>
46
+ <array>
47
+ <!-- Add this dict entry to the array if the file already exists. -->
48
+ <dict>
49
+ <key>NSPrivacyAccessedAPIType</key>
50
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
51
+ <key>NSPrivacyAccessedAPITypeReasons</key>
52
+ <array>
53
+ <string>CA92.1</string>
54
+ </array>
55
+ </dict>
56
+ </array>
57
+ </dict>
58
+ </plist>
59
+ ```
60
+
61
+ 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.
62
+
34
63
  ## Installation
35
64
 
36
65
  ```bash
@@ -55,7 +55,7 @@ public class CapacitorUpdaterPlugin extends Plugin {
55
55
  private static final String channelUrlDefault =
56
56
  "https://api.capgo.app/channel_self";
57
57
 
58
- private final String PLUGIN_VERSION = "6.0.8";
58
+ private final String PLUGIN_VERSION = "6.0.14";
59
59
  private static final String DELAY_CONDITION_PREFERENCES = "";
60
60
 
61
61
  private SharedPreferences.Editor editor;
@@ -1355,7 +1355,10 @@ public class CapacitorUpdaterPlugin extends Plugin {
1355
1355
  final BundleInfo current = this.implementation.getCurrentBundle();
1356
1356
 
1357
1357
  if (current.isBuiltin()) {
1358
- Log.i(CapacitorUpdater.TAG, "Built-in bundle is active. Nothing to do.");
1358
+ Log.i(
1359
+ CapacitorUpdater.TAG,
1360
+ "Built-in bundle is active. We skip the check for notifyAppReady."
1361
+ );
1359
1362
  return;
1360
1363
  }
1361
1364
  Log.d(CapacitorUpdater.TAG, "Current bundle is: " + current);
@@ -105,6 +105,7 @@ public class DownloadService extends IntentService {
105
105
 
106
106
  private void notifyDownload(String id, int percent) {
107
107
  Intent intent = new Intent(PERCENTDOWNLOAD);
108
+ intent.setPackage(getPackageName());
108
109
  intent.putExtra(ID, id);
109
110
  intent.putExtra(PERCENT, percent);
110
111
  sendBroadcast(intent);
@@ -119,6 +120,7 @@ public class DownloadService extends IntentService {
119
120
  String error
120
121
  ) {
121
122
  Intent intent = new Intent(NOTIFICATION);
123
+ intent.setPackage(getPackageName());
122
124
  if (dest != null && !dest.isEmpty()) {
123
125
  intent.putExtra(FILEDEST, dest);
124
126
  }
@@ -15,7 +15,7 @@ import Version
15
15
  @objc(CapacitorUpdaterPlugin)
16
16
  public class CapacitorUpdaterPlugin: CAPPlugin {
17
17
  public var implementation = CapacitorUpdater()
18
- private let PLUGIN_VERSION: String = "6.0.8"
18
+ private let PLUGIN_VERSION: String = "6.0.14"
19
19
  static let updateUrlDefault = "https://api.capgo.app/updates"
20
20
  static let statsUrlDefault = "https://api.capgo.app/stats"
21
21
  static let channelUrlDefault = "https://api.capgo.app/channel_self"
@@ -598,7 +598,7 @@ public class CapacitorUpdaterPlugin: CAPPlugin {
598
598
  // Automatically roll back to fallback version if notifyAppReady has not been called yet
599
599
  let current: BundleInfo = self.implementation.getCurrentBundle()
600
600
  if current.isBuiltin() {
601
- print("\(self.implementation.TAG) Built-in bundle is active. Nothing to do.")
601
+ print("\(self.implementation.TAG) Built-in bundle is active. We skip the check for notifyAppReady.")
602
602
  return
603
603
  }
604
604
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-updater",
3
- "version": "6.0.8",
3
+ "version": "6.0.14",
4
4
  "packageManager": "pnpm@8.15.8",
5
5
  "license": "MPL-2.0",
6
6
  "description": "Live update for capacitor apps",
@@ -43,7 +43,7 @@
43
43
  "verify:web": "npm run build",
44
44
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
45
45
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --autocorrect --format",
46
- "eslint": "eslint .",
46
+ "eslint": "eslint . --ext .ts",
47
47
  "prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
48
48
  "swiftlint": "node-swiftlint",
49
49
  "docgen": "docgen --api CapacitorUpdaterPlugin --output-readme README.md --output-json dist/docs.json",
@@ -59,18 +59,18 @@
59
59
  "@capacitor/core": "^6.0.0",
60
60
  "@capacitor/docgen": "^0.2.2",
61
61
  "@capacitor/ios": "^6.0.0",
62
- "@ionic/eslint-config": "^0.3.0",
62
+ "@ionic/eslint-config": "^0.4.0",
63
63
  "@ionic/prettier-config": "^4.0.0",
64
64
  "@ionic/swiftlint-config": "^1.1.2",
65
- "@types/node": "^20.12.7",
66
- "@typescript-eslint/eslint-plugin": "^7.8.0",
67
- "@typescript-eslint/parser": "^7.8.0",
68
- "eslint": "^9.1.1",
65
+ "@types/node": "^20.12.12",
66
+ "@typescript-eslint/eslint-plugin": "^7.11.0",
67
+ "@typescript-eslint/parser": "^7.11.0",
68
+ "eslint": "^8.57.0",
69
69
  "eslint-plugin-import": "^2.29.1",
70
70
  "prettier": "^3.2.5",
71
71
  "prettier-plugin-java": "^2.6.0",
72
- "rimraf": "^5.0.5",
73
- "rollup": "^4.17.1",
72
+ "rimraf": "^5.0.7",
73
+ "rollup": "^4.18.0",
74
74
  "swiftlint": "^1.0.2",
75
75
  "typescript": "^5.4.5"
76
76
  },
@@ -78,6 +78,9 @@
78
78
  "@capacitor/core": "^6.0.0"
79
79
  },
80
80
  "prettier": "@ionic/prettier-config",
81
+ "eslintConfig": {
82
+ "extends": "@ionic/eslint-config/recommended"
83
+ },
81
84
  "capacitor": {
82
85
  "ios": {
83
86
  "src": "ios"