@capacitor/device 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: ["DevicePlugin"])
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: "DevicePlugin",
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/DevicePlugin"),
23
23
  .testTarget(
package/README.md CHANGED
@@ -9,7 +9,40 @@ npm install @capacitor/device
9
9
  npx cap sync
10
10
  ```
11
11
 
12
- ## Example
12
+ ## Apple Privacy Manifest Requirements
13
+
14
+ 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.
15
+
16
+ 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.
17
+
18
+ For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest).
19
+
20
+ **For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryDiskSpace](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278397) and the recommended reason is [85F4.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278397).**
21
+
22
+ ### Example PrivacyInfo.xcprivacy
23
+
24
+ ```xml
25
+ <?xml version="1.0" encoding="UTF-8"?>
26
+ <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
27
+ <plist version="1.0">
28
+ <dict>
29
+ <key>NSPrivacyAccessedAPITypes</key>
30
+ <array>
31
+ <!-- Add this dict entry to the array if the PrivacyInfo file already exists -->
32
+ <dict>
33
+ <key>NSPrivacyAccessedAPIType</key>
34
+ <string>NSPrivacyAccessedAPICategoryDiskSpace</string>
35
+ <key>NSPrivacyAccessedAPITypeReasons</key>
36
+ <array>
37
+ <string>85F4.1</string>
38
+ </array>
39
+ </dict>
40
+ </array>
41
+ </dict>
42
+ </plist>
43
+ ```
44
+
45
+ ## Example Plugin Usage
13
46
 
14
47
  ```typescript
15
48
  import { Device } from '@capacitor/device';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/device",
3
- "version": "6.0.0-rc.1",
3
+ "version": "6.0.0",
4
4
  "description": "The Device API exposes internal information about the device, such as the model and operating system version, along with user information such as unique ids.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -48,10 +48,10 @@
48
48
  "publish:cocoapod": "pod trunk push ./CapacitorDevice.podspec --allow-warnings"
49
49
  },
50
50
  "devDependencies": {
51
- "@capacitor/android": "next",
52
- "@capacitor/core": "next",
51
+ "@capacitor/android": "^6.0.0",
52
+ "@capacitor/core": "^6.0.0",
53
53
  "@capacitor/docgen": "0.2.2",
54
- "@capacitor/ios": "next",
54
+ "@capacitor/ios": "^6.0.0",
55
55
  "@ionic/eslint-config": "^0.3.0",
56
56
  "@ionic/prettier-config": "~1.0.1",
57
57
  "@ionic/swiftlint-config": "^1.1.2",
@@ -67,7 +67,7 @@
67
67
  "uvu": "^0.5.1"
68
68
  },
69
69
  "peerDependencies": {
70
- "@capacitor/core": "next"
70
+ "@capacitor/core": "^6.0.0"
71
71
  },
72
72
  "prettier": "@ionic/prettier-config",
73
73
  "swiftlint": "@ionic/swiftlint-config",
@@ -85,5 +85,5 @@
85
85
  "publishConfig": {
86
86
  "access": "public"
87
87
  },
88
- "gitHead": "0ccb9c48af9740a24f1f084e9417d5d5e2201311"
88
+ "gitHead": "00edb1fe8a21311887ea1532e37271ecb7314bed"
89
89
  }