@capacitor/preferences 6.0.0-rc.1 → 6.0.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.
package/Package.swift CHANGED
@@ -10,14 +10,14 @@ let package = Package(
10
10
  targets: ["PreferencesPlugin"])
11
11
  ],
12
12
  dependencies: [
13
- .package(url: "https://github.com/ionic-team/capacitor-spm.git", branch: "main")
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main")
14
14
  ],
15
15
  targets: [
16
16
  .target(
17
17
  name: "PreferencesPlugin",
18
18
  dependencies: [
19
- .product(name: "Capacitor", package: "capacitor-spm"),
20
- .product(name: "Cordova", package: "capacitor-spm")
19
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
+ .product(name: "Cordova", package: "capacitor-swift-pm")
21
21
  ],
22
22
  path: "ios/Sources/PreferencesPlugin"),
23
23
  .testTarget(
package/README.md CHANGED
@@ -23,7 +23,40 @@ npm install @capacitor/preferences
23
23
  npx cap sync
24
24
  ```
25
25
 
26
- ## Example
26
+ ## Apple Privacy Manifest Requirements
27
+
28
+ Apple mandates that app developers now specify approved reasons for API usage to enhance user privacy. By May 1st, 2024, it's required to include these reasons when submitting apps to the App Store Connect.
29
+
30
+ When using this specific plugin in your app, you must create a `PrivacyInfo.xcprivacy` file in `/ios/App` or use the VS Code Extension to generate it, specifying the usage reasons.
31
+
32
+ For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest).
33
+
34
+ **For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryUserDefaults](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401) and the recommended reason is [CA92.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278401).**
35
+
36
+ ### Example PrivacyInfo.xcprivacy
37
+
38
+ ```xml
39
+ <?xml version="1.0" encoding="UTF-8"?>
40
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
41
+ <plist version="1.0">
42
+ <dict>
43
+ <key>NSPrivacyAccessedAPITypes</key>
44
+ <array>
45
+ <!-- Add this dict entry to the array if the PrivacyInfo file already exists -->
46
+ <dict>
47
+ <key>NSPrivacyAccessedAPIType</key>
48
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
49
+ <key>NSPrivacyAccessedAPITypeReasons</key>
50
+ <array>
51
+ <string>CA92.1</string>
52
+ </array>
53
+ </dict>
54
+ </array>
55
+ </dict>
56
+ </plist>
57
+ ```
58
+
59
+ ## Example Plugin Usage
27
60
 
28
61
  ```typescript
29
62
  import { Preferences } from '@capacitor/preferences';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/preferences",
3
- "version": "6.0.0-rc.1",
3
+ "version": "6.0.0",
4
4
  "description": "The Preferences API provides a simple key/value persistent store for lightweight data.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -47,10 +47,10 @@
47
47
  "publish:cocoapod": "pod trunk push ./CapacitorPreferences.podspec --allow-warnings"
48
48
  },
49
49
  "devDependencies": {
50
- "@capacitor/android": "next",
51
- "@capacitor/core": "next",
50
+ "@capacitor/android": "^6.0.0",
51
+ "@capacitor/core": "^6.0.0",
52
52
  "@capacitor/docgen": "0.2.2",
53
- "@capacitor/ios": "next",
53
+ "@capacitor/ios": "^6.0.0",
54
54
  "@ionic/eslint-config": "^0.3.0",
55
55
  "@ionic/prettier-config": "~1.0.1",
56
56
  "@ionic/swiftlint-config": "^1.1.2",
@@ -63,7 +63,7 @@
63
63
  "typescript": "~4.1.5"
64
64
  },
65
65
  "peerDependencies": {
66
- "@capacitor/core": "next"
66
+ "@capacitor/core": "^6.0.0"
67
67
  },
68
68
  "prettier": "@ionic/prettier-config",
69
69
  "swiftlint": "@ionic/swiftlint-config",
@@ -81,5 +81,5 @@
81
81
  "publishConfig": {
82
82
  "access": "public"
83
83
  },
84
- "gitHead": "0ccb9c48af9740a24f1f084e9417d5d5e2201311"
84
+ "gitHead": "00edb1fe8a21311887ea1532e37271ecb7314bed"
85
85
  }