From 18fc30c7be74717ded1021ab54b25603d823983f Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Tue, 9 Apr 2024 22:48:41 -0700 Subject: [PATCH 1/7] docs: add apple privacy manifest code requirements --- device/README.md | 77 ++++++++++++++------- filesystem/README.md | 154 ++++++++++++++++++++---------------------- preferences/README.md | 88 +++++++++++++++--------- 3 files changed, 179 insertions(+), 140 deletions(-) diff --git a/device/README.md b/device/README.md index 2630eab2c..46edc9582 100644 --- a/device/README.md +++ b/device/README.md @@ -9,7 +9,44 @@ npm install @capacitor/device npx cap sync ``` -## Example +## Apple Privacy Manifest Requirements + +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. + +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. + +### Manual Steps + +1. In Xcode, select File > New File. +2. Choose App Privacy File type under the Resource section. +3. After creation, edit `PrivacyInfo.xcprivacy` to add the necessary keys and reasons, as detailed in [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). + +### Example PrivacyInfo.xcprivacy + +```xml + + + + + NSPrivacyTracking + + NSPrivacyAccessedAPITypes + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryDiskSpace + NSPrivacyAccessedAPITypeReasons + + 85F4.1 + + + + + +``` + +## Example Plugin Usage ```typescript import { Device } from '@capacitor/device'; @@ -31,13 +68,13 @@ const logBatteryInfo = async () => { -* [`getId()`](#getid) -* [`getInfo()`](#getinfo) -* [`getBatteryInfo()`](#getbatteryinfo) -* [`getLanguageCode()`](#getlanguagecode) -* [`getLanguageTag()`](#getlanguagetag) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) +- [`getId()`](#getid) +- [`getInfo()`](#getinfo) +- [`getBatteryInfo()`](#getbatteryinfo) +- [`getLanguageCode()`](#getlanguagecode) +- [`getLanguageTag()`](#getlanguagetag) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) @@ -56,8 +93,7 @@ Return an unique identifier for the device. **Since:** 1.0.0 --------------------- - +--- ### getInfo() @@ -71,8 +107,7 @@ Return information about the underlying device/os/platform. **Since:** 1.0.0 --------------------- - +--- ### getBatteryInfo() @@ -86,8 +121,7 @@ Return information about the battery. **Since:** 1.0.0 --------------------- - +--- ### getLanguageCode() @@ -101,8 +135,7 @@ Get the device's current language locale code. **Since:** 1.0.0 --------------------- - +--- ### getLanguageTag() @@ -116,18 +149,15 @@ Get the device's current language locale tag. **Since:** 4.0.0 --------------------- - +--- ### Interfaces - #### DeviceId | Prop | Type | Description | Since | | ---------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **`identifier`** | string | The identifier of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install ids. On iOS, the identifier is a UUID that uniquely identifies a device to the app’s vendor ([read more](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)). on Android 8+, __the identifier is a 64-bit number (expressed as a hexadecimal string)__, unique to each combination of app-signing key, user, and device ([read more](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)). On web, a random identifier is generated and stored on localStorage for subsequent calls. If localStorage is not available a new random identifier will be generated on every call. | 1.0.0 | - +| **`identifier`** | string | The identifier of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install ids. On iOS, the identifier is a UUID that uniquely identifies a device to the app’s vendor ([read more](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)). on Android 8+, **the identifier is a 64-bit number (expressed as a hexadecimal string)**, unique to each combination of app-signing key, user, and device ([read more](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)). On web, a random identifier is generated and stored on localStorage for subsequent calls. If localStorage is not available a new random identifier will be generated on every call. | 1.0.0 | #### DeviceInfo @@ -149,7 +179,6 @@ Get the device's current language locale tag. | **`realDiskTotal`** | number | The total size of the normal data storage path, in bytes. | 1.1.0 | | **`webViewVersion`** | string | The web view browser version | 1.0.0 | - #### BatteryInfo | Prop | Type | Description | Since | @@ -157,24 +186,20 @@ Get the device's current language locale tag. | **`batteryLevel`** | number | A percentage (0 to 1) indicating how much the battery is charged. | 1.0.0 | | **`isCharging`** | boolean | Whether the device is charging. | 1.0.0 | - #### GetLanguageCodeResult | Prop | Type | Description | Since | | ----------- | ------------------- | ---------------------------- | ----- | | **`value`** | string | Two character language code. | 1.0.0 | - #### LanguageTag | Prop | Type | Description | Since | | ----------- | ------------------- | ----------------------------------------------- | ----- | | **`value`** | string | Returns a well-formed IETF BCP 47 language tag. | 4.0.0 | - ### Type Aliases - #### OperatingSystem 'ios' | 'android' | 'windows' | 'mac' | 'unknown' diff --git a/filesystem/README.md b/filesystem/README.md index fc22a0887..9835d858e 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -9,9 +9,46 @@ npm install @capacitor/filesystem npx cap sync ``` +## Apple Privacy Manifest Requirements + +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. + +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. + +### Manual Steps + +1. In Xcode, select File > New File. +2. Choose App Privacy File type under the Resource section. +3. After creation, edit `PrivacyInfo.xcprivacy` to add the necessary keys and reasons, as detailed in [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). + +### Example PrivacyInfo.xcprivacy + +```xml + + + + + NSPrivacyTracking + + NSPrivacyAccessedAPITypes + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + + +``` + ## iOS -To have files appear in the Files app, you must set the following keys to `YES` in `Info.plist`: +To have files appear in the Files app, you must also set the following keys to `YES` in `Info.plist`: - `UIFileSharingEnabled` (`Application supports iTunes file sharing`) - `LSSupportsOpeningDocumentsInPlace` (`Supports opening documents in place`) @@ -86,25 +123,25 @@ const readFilePath = async () => { -* [`readFile(...)`](#readfile) -* [`writeFile(...)`](#writefile) -* [`appendFile(...)`](#appendfile) -* [`deleteFile(...)`](#deletefile) -* [`mkdir(...)`](#mkdir) -* [`rmdir(...)`](#rmdir) -* [`readdir(...)`](#readdir) -* [`getUri(...)`](#geturi) -* [`stat(...)`](#stat) -* [`rename(...)`](#rename) -* [`copy(...)`](#copy) -* [`checkPermissions()`](#checkpermissions) -* [`requestPermissions()`](#requestpermissions) -* [`downloadFile(...)`](#downloadfile) -* [`addListener('progress', ...)`](#addlistenerprogress-) -* [`removeAllListeners()`](#removealllisteners) -* [Interfaces](#interfaces) -* [Type Aliases](#type-aliases) -* [Enums](#enums) +- [`readFile(...)`](#readfile) +- [`writeFile(...)`](#writefile) +- [`appendFile(...)`](#appendfile) +- [`deleteFile(...)`](#deletefile) +- [`mkdir(...)`](#mkdir) +- [`rmdir(...)`](#rmdir) +- [`readdir(...)`](#readdir) +- [`getUri(...)`](#geturi) +- [`stat(...)`](#stat) +- [`rename(...)`](#rename) +- [`copy(...)`](#copy) +- [`checkPermissions()`](#checkpermissions) +- [`requestPermissions()`](#requestpermissions) +- [`downloadFile(...)`](#downloadfile) +- [`addListener('progress', ...)`](#addlistenerprogress-) +- [`removeAllListeners()`](#removealllisteners) +- [Interfaces](#interfaces) +- [Type Aliases](#type-aliases) +- [Enums](#enums) @@ -127,8 +164,7 @@ Read a file from disk **Since:** 1.0.0 --------------------- - +--- ### writeFile(...) @@ -146,8 +182,7 @@ Write a file to disk in the specified location on device **Since:** 1.0.0 --------------------- - +--- ### appendFile(...) @@ -163,8 +198,7 @@ Append to a file on disk in the specified location on device **Since:** 1.0.0 --------------------- - +--- ### deleteFile(...) @@ -180,8 +214,7 @@ Delete a file from disk **Since:** 1.0.0 --------------------- - +--- ### mkdir(...) @@ -197,8 +230,7 @@ Create a directory. **Since:** 1.0.0 --------------------- - +--- ### rmdir(...) @@ -214,8 +246,7 @@ Remove a directory **Since:** 1.0.0 --------------------- - +--- ### readdir(...) @@ -233,8 +264,7 @@ Return a list of files from the directory (not recursive) **Since:** 1.0.0 --------------------- - +--- ### getUri(...) @@ -252,8 +282,7 @@ Return full File URI for a path and directory **Since:** 1.0.0 --------------------- - +--- ### stat(...) @@ -271,8 +300,7 @@ Return data about a file **Since:** 1.0.0 --------------------- - +--- ### rename(...) @@ -288,8 +316,7 @@ Rename a file or directory **Since:** 1.0.0 --------------------- - +--- ### copy(...) @@ -307,8 +334,7 @@ Copy a file or directory **Since:** 1.0.0 --------------------- - +--- ### checkPermissions() @@ -324,8 +350,7 @@ Required on Android, only when using `Directory.Documents`< **Since:** 1.0.0 --------------------- - +--- ### requestPermissions() @@ -341,8 +366,7 @@ Required on Android, only when using `Directory.Documents`< **Since:** 1.0.0 --------------------- - +--- ### downloadFile(...) @@ -360,8 +384,7 @@ Perform a http request to a server and download the file to the specified destin **Since:** 5.1.0 --------------------- - +--- ### addListener('progress', ...) @@ -380,8 +403,7 @@ Add a listener to file download progress events. **Since:** 5.1.0 --------------------- - +--- ### removeAllListeners() @@ -393,19 +415,16 @@ Remove all listeners for this plugin. **Since:** 5.2.0 --------------------- - +--- ### Interfaces - #### ReadFileResult | Prop | Type | Description | Since | | ---------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----- | | **`data`** | string \| Blob | The representation of the data contained in the file Note: Blob is only available on Web. On native, the data is returned as a string. | 1.0.0 | - #### ReadFileOptions | Prop | Type | Description | Since | @@ -414,14 +433,12 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to read the file from | 1.0.0 | | **`encoding`** | Encoding | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass Encoding.UTF8 to read data as string | 1.0.0 | - #### WriteFileResult | Prop | Type | Description | Since | | --------- | ------------------- | --------------------------------------- | ----- | | **`uri`** | string | The uri where the file was written into | 1.0.0 | - #### WriteFileOptions | Prop | Type | Description | Default | Since | @@ -432,7 +449,6 @@ Remove all listeners for this plugin. | **`encoding`** | Encoding | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass Encoding.UTF8 to write data as string | | 1.0.0 | | **`recursive`** | boolean | Whether to create any missing parent directories. | false | 1.0.0 | - #### AppendFileOptions | Prop | Type | Description | Since | @@ -442,7 +458,6 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to store the file in | 1.0.0 | | **`encoding`** | Encoding | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass Encoding.UTF8 to write data as string | 1.0.0 | - #### DeleteFileOptions | Prop | Type | Description | Since | @@ -450,7 +465,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to delete | 1.0.0 | | **`directory`** | Directory | The `Directory` to delete the file from | 1.0.0 | - #### MkdirOptions | Prop | Type | Description | Default | Since | @@ -459,7 +473,6 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to make the new directory in | | 1.0.0 | | **`recursive`** | boolean | Whether to create any missing parent directories as well. | false | 1.0.0 | - #### RmdirOptions | Prop | Type | Description | Default | Since | @@ -468,14 +481,12 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to remove the directory from | | 1.0.0 | | **`recursive`** | boolean | Whether to recursively remove the contents of the directory | false | 1.0.0 | - #### ReaddirResult | Prop | Type | Description | Since | | ----------- | ----------------------- | -------------------------------------------------- | ----- | | **`files`** | FileInfo[] | List of files and directories inside the directory | 1.0.0 | - #### FileInfo | Prop | Type | Description | Since | @@ -487,7 +498,6 @@ Remove all listeners for this plugin. | **`mtime`** | number | Time of last modification in milliseconds. | 4.0.0 | | **`uri`** | string | The uri of the file. | 4.0.0 | - #### ReaddirOptions | Prop | Type | Description | Since | @@ -495,14 +505,12 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the directory to read | 1.0.0 | | **`directory`** | Directory | The `Directory` to list files from | 1.0.0 | - #### GetUriResult | Prop | Type | Description | Since | | --------- | ------------------- | ------------------- | ----- | | **`uri`** | string | The uri of the file | 1.0.0 | - #### GetUriOptions | Prop | Type | Description | Since | @@ -510,7 +518,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to get the URI for | 1.0.0 | | **`directory`** | Directory | The `Directory` to get the file under | 1.0.0 | - #### StatResult | Prop | Type | Description | Since | @@ -521,7 +528,6 @@ Remove all listeners for this plugin. | **`mtime`** | number | Time of last modification in milliseconds. | 1.0.0 | | **`uri`** | string | The uri of the file | 1.0.0 | - #### StatOptions | Prop | Type | Description | Since | @@ -529,7 +535,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to get data about | 1.0.0 | | **`directory`** | Directory | The `Directory` to get the file under | 1.0.0 | - #### CopyOptions | Prop | Type | Description | Since | @@ -539,21 +544,18 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` containing the existing file or directory | 1.0.0 | | **`toDirectory`** | Directory | The `Directory` containing the destination file or directory. If not supplied will use the 'directory' parameter as the destination | 1.0.0 | - #### CopyResult | Prop | Type | Description | Since | | --------- | ------------------- | -------------------------------------- | ----- | | **`uri`** | string | The uri where the file was copied into | 4.0.0 | - #### PermissionStatus | Prop | Type | | ------------------- | ----------------------------------------------------------- | | **`publicStorage`** | PermissionState | - #### DownloadFileResult | Prop | Type | Description | Since | @@ -561,7 +563,6 @@ Remove all listeners for this plugin. | **`path`** | string | The path the file was downloaded to. | 5.1.0 | | **`blob`** | Blob | The blob data of the downloaded file. This is only available on web. | 5.1.0 | - #### DownloadFileOptions | Prop | Type | Description | Default | Since | @@ -571,14 +572,12 @@ Remove all listeners for this plugin. | **`progress`** | boolean | An optional listener function to receive downloaded progress events. If this option is used, progress event should be dispatched on every chunk received. Chunks are throttled to every 100ms on Android/iOS to avoid slowdowns. | | 5.1.0 | | **`recursive`** | boolean | Whether to create any missing parent directories. | false | 5.1.2 | - #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | - #### ProgressStatus | Prop | Type | Description | Since | @@ -587,30 +586,24 @@ Remove all listeners for this plugin. | **`bytes`** | number | The number of bytes downloaded so far. | 5.1.0 | | **`contentLength`** | number | The total number of bytes to download for this file. | 5.1.0 | - ### Type Aliases - #### RenameOptions CopyOptions - #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' - #### ProgressListener A listener function that receives progress events. (progress: ProgressStatus): void - ### Enums - #### Directory | Members | Value | Description | Since | @@ -622,7 +615,6 @@ A listener function that receives progress events. | **`External`** | 'EXTERNAL' | The external directory. On iOS it will use the Documents directory. On Android it's the directory on the primary shared/external storage device where the application can place persistent files it owns. These files are internal to the applications, and not typically visible to the user as media. Files will be deleted when the application is uninstalled. | 1.0.0 | | **`ExternalStorage`** | 'EXTERNAL_STORAGE' | The external storage directory. On iOS it will use the Documents directory. On Android it's the primary shared/external storage directory. It's not accesible on Android 10 unless the app enables legacy External Storage by adding `android:requestLegacyExternalStorage="true"` in the `application` tag in the `AndroidManifest.xml`. It's not accesible on Android 11 or newer. | 1.0.0 | - #### Encoding | Members | Value | Description | Since | diff --git a/preferences/README.md b/preferences/README.md index 5203a84b0..3a0ec06e1 100644 --- a/preferences/README.md +++ b/preferences/README.md @@ -23,7 +23,44 @@ npm install @capacitor/preferences npx cap sync ``` -## Example +## Apple Privacy Manifest Requirements + +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. + +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. + +### Manual Steps + +1. In Xcode, select File > New File. +2. Choose App Privacy File type under the Resource section. +3. After creation, edit `PrivacyInfo.xcprivacy` to add the necessary keys and reasons, as detailed in [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). + +### Example PrivacyInfo.xcprivacy + +```xml + + + + + NSPrivacyTracking + + NSPrivacyAccessedAPITypes + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + + +``` + +## Example Plugin Usage ```typescript import { Preferences } from '@capacitor/preferences'; @@ -56,15 +93,15 @@ This method can also be used to store non-string values, such as numbers and boo -* [`configure(...)`](#configure) -* [`get(...)`](#get) -* [`set(...)`](#set) -* [`remove(...)`](#remove) -* [`clear()`](#clear) -* [`keys()`](#keys) -* [`migrate()`](#migrate) -* [`removeOld()`](#removeold) -* [Interfaces](#interfaces) +- [`configure(...)`](#configure) +- [`get(...)`](#get) +- [`set(...)`](#set) +- [`remove(...)`](#remove) +- [`clear()`](#clear) +- [`keys()`](#keys) +- [`migrate()`](#migrate) +- [`removeOld()`](#removeold) +- [Interfaces](#interfaces) @@ -87,8 +124,7 @@ Options that are `undefined` will not be used. **Since:** 1.0.0 --------------------- - +--- ### get(...) @@ -106,8 +142,7 @@ Get the value from preferences of a given key. **Since:** 1.0.0 --------------------- - +--- ### set(...) @@ -123,8 +158,7 @@ Set the value in preferences for a given key. **Since:** 1.0.0 --------------------- - +--- ### remove(...) @@ -140,8 +174,7 @@ Remove the value from preferences for a given key, if any. **Since:** 1.0.0 --------------------- - +--- ### clear() @@ -153,8 +186,7 @@ Clear keys and values from preferences. **Since:** 1.0.0 --------------------- - +--- ### keys() @@ -168,8 +200,7 @@ Return the list of known keys in preferences. **Since:** 1.0.0 --------------------- - +--- ### migrate() @@ -187,8 +218,7 @@ To remove the old data after being migrated, call removeOld(). **Since:** 1.0.0 --------------------- - +--- ### removeOld() @@ -200,33 +230,28 @@ Removes old data with `_cap_` prefix from the Capacitor 2 Storage plugin. **Since:** 1.1.0 --------------------- - +--- ### Interfaces - #### ConfigureOptions | Prop | Type | Description | Default | Since | | ----------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----- | | **`group`** | string | Set the preferences group. Preferences groups are used to organize key/value pairs. Using the value 'NativeStorage' provides backwards-compatibility with [`cordova-plugin-nativestorage`](https://www.npmjs.com/package/cordova-plugin-nativestorage). WARNING: The `clear()` method can delete unintended values when using the 'NativeStorage' group. | CapacitorStorage | 1.0.0 | - #### GetResult | Prop | Type | Description | Since | | ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----- | | **`value`** | string \| null | The value from preferences associated with the given key. If a value was not previously set or was removed, value will be `null`. | 1.0.0 | - #### GetOptions | Prop | Type | Description | Since | | --------- | ------------------- | ------------------------------------------------- | ----- | | **`key`** | string | The key whose value to retrieve from preferences. | 1.0.0 | - #### SetOptions | Prop | Type | Description | Since | @@ -234,21 +259,18 @@ Removes old data with `_cap_` prefix from the Capacitor 2 Storage plugin. | **`key`** | string | The key to associate with the value being set in preferences. | 1.0.0 | | **`value`** | string | The value to set in preferences with the associated key. | 1.0.0 | - #### RemoveOptions | Prop | Type | Description | Since | | --------- | ------------------- | ----------------------------------------------- | ----- | | **`key`** | string | The key whose value to remove from preferences. | 1.0.0 | - #### KeysResult | Prop | Type | Description | Since | | ---------- | --------------------- | ------------------------------ | ----- | | **`keys`** | string[] | The known keys in preferences. | 1.0.0 | - #### MigrateResult | Prop | Type | Description | Since | From 73e3cbb80315c649f38b731d06f813c1eedb1501 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Tue, 9 Apr 2024 22:53:30 -0700 Subject: [PATCH 2/7] rerun build to fix linting --- device/README.md | 38 +++++++++----- filesystem/README.md | 115 +++++++++++++++++++++++++++++------------- preferences/README.md | 49 +++++++++++------- 3 files changed, 137 insertions(+), 65 deletions(-) diff --git a/device/README.md b/device/README.md index 46edc9582..71d16c20a 100644 --- a/device/README.md +++ b/device/README.md @@ -68,13 +68,13 @@ const logBatteryInfo = async () => { -- [`getId()`](#getid) -- [`getInfo()`](#getinfo) -- [`getBatteryInfo()`](#getbatteryinfo) -- [`getLanguageCode()`](#getlanguagecode) -- [`getLanguageTag()`](#getlanguagetag) -- [Interfaces](#interfaces) -- [Type Aliases](#type-aliases) +* [`getId()`](#getid) +* [`getInfo()`](#getinfo) +* [`getBatteryInfo()`](#getbatteryinfo) +* [`getLanguageCode()`](#getlanguagecode) +* [`getLanguageTag()`](#getlanguagetag) +* [Interfaces](#interfaces) +* [Type Aliases](#type-aliases) @@ -93,7 +93,8 @@ Return an unique identifier for the device. **Since:** 1.0.0 ---- +-------------------- + ### getInfo() @@ -107,7 +108,8 @@ Return information about the underlying device/os/platform. **Since:** 1.0.0 ---- +-------------------- + ### getBatteryInfo() @@ -121,7 +123,8 @@ Return information about the battery. **Since:** 1.0.0 ---- +-------------------- + ### getLanguageCode() @@ -135,7 +138,8 @@ Get the device's current language locale code. **Since:** 1.0.0 ---- +-------------------- + ### getLanguageTag() @@ -149,15 +153,18 @@ Get the device's current language locale tag. **Since:** 4.0.0 ---- +-------------------- + ### Interfaces + #### DeviceId | Prop | Type | Description | Since | | ---------------- | ------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | -| **`identifier`** | string | The identifier of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install ids. On iOS, the identifier is a UUID that uniquely identifies a device to the app’s vendor ([read more](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)). on Android 8+, **the identifier is a 64-bit number (expressed as a hexadecimal string)**, unique to each combination of app-signing key, user, and device ([read more](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)). On web, a random identifier is generated and stored on localStorage for subsequent calls. If localStorage is not available a new random identifier will be generated on every call. | 1.0.0 | +| **`identifier`** | string | The identifier of the device as available to the app. This identifier may change on modern mobile platforms that only allow per-app install ids. On iOS, the identifier is a UUID that uniquely identifies a device to the app’s vendor ([read more](https://developer.apple.com/documentation/uikit/uidevice/1620059-identifierforvendor)). on Android 8+, __the identifier is a 64-bit number (expressed as a hexadecimal string)__, unique to each combination of app-signing key, user, and device ([read more](https://developer.android.com/reference/android/provider/Settings.Secure#ANDROID_ID)). On web, a random identifier is generated and stored on localStorage for subsequent calls. If localStorage is not available a new random identifier will be generated on every call. | 1.0.0 | + #### DeviceInfo @@ -179,6 +186,7 @@ Get the device's current language locale tag. | **`realDiskTotal`** | number | The total size of the normal data storage path, in bytes. | 1.1.0 | | **`webViewVersion`** | string | The web view browser version | 1.0.0 | + #### BatteryInfo | Prop | Type | Description | Since | @@ -186,20 +194,24 @@ Get the device's current language locale tag. | **`batteryLevel`** | number | A percentage (0 to 1) indicating how much the battery is charged. | 1.0.0 | | **`isCharging`** | boolean | Whether the device is charging. | 1.0.0 | + #### GetLanguageCodeResult | Prop | Type | Description | Since | | ----------- | ------------------- | ---------------------------- | ----- | | **`value`** | string | Two character language code. | 1.0.0 | + #### LanguageTag | Prop | Type | Description | Since | | ----------- | ------------------- | ----------------------------------------------- | ----- | | **`value`** | string | Returns a well-formed IETF BCP 47 language tag. | 4.0.0 | + ### Type Aliases + #### OperatingSystem 'ios' | 'android' | 'windows' | 'mac' | 'unknown' diff --git a/filesystem/README.md b/filesystem/README.md index 9835d858e..b71c2b150 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -123,25 +123,25 @@ const readFilePath = async () => { -- [`readFile(...)`](#readfile) -- [`writeFile(...)`](#writefile) -- [`appendFile(...)`](#appendfile) -- [`deleteFile(...)`](#deletefile) -- [`mkdir(...)`](#mkdir) -- [`rmdir(...)`](#rmdir) -- [`readdir(...)`](#readdir) -- [`getUri(...)`](#geturi) -- [`stat(...)`](#stat) -- [`rename(...)`](#rename) -- [`copy(...)`](#copy) -- [`checkPermissions()`](#checkpermissions) -- [`requestPermissions()`](#requestpermissions) -- [`downloadFile(...)`](#downloadfile) -- [`addListener('progress', ...)`](#addlistenerprogress-) -- [`removeAllListeners()`](#removealllisteners) -- [Interfaces](#interfaces) -- [Type Aliases](#type-aliases) -- [Enums](#enums) +* [`readFile(...)`](#readfile) +* [`writeFile(...)`](#writefile) +* [`appendFile(...)`](#appendfile) +* [`deleteFile(...)`](#deletefile) +* [`mkdir(...)`](#mkdir) +* [`rmdir(...)`](#rmdir) +* [`readdir(...)`](#readdir) +* [`getUri(...)`](#geturi) +* [`stat(...)`](#stat) +* [`rename(...)`](#rename) +* [`copy(...)`](#copy) +* [`checkPermissions()`](#checkpermissions) +* [`requestPermissions()`](#requestpermissions) +* [`downloadFile(...)`](#downloadfile) +* [`addListener('progress', ...)`](#addlistenerprogress-) +* [`removeAllListeners()`](#removealllisteners) +* [Interfaces](#interfaces) +* [Type Aliases](#type-aliases) +* [Enums](#enums) @@ -164,7 +164,8 @@ Read a file from disk **Since:** 1.0.0 ---- +-------------------- + ### writeFile(...) @@ -182,7 +183,8 @@ Write a file to disk in the specified location on device **Since:** 1.0.0 ---- +-------------------- + ### appendFile(...) @@ -198,7 +200,8 @@ Append to a file on disk in the specified location on device **Since:** 1.0.0 ---- +-------------------- + ### deleteFile(...) @@ -214,7 +217,8 @@ Delete a file from disk **Since:** 1.0.0 ---- +-------------------- + ### mkdir(...) @@ -230,7 +234,8 @@ Create a directory. **Since:** 1.0.0 ---- +-------------------- + ### rmdir(...) @@ -246,7 +251,8 @@ Remove a directory **Since:** 1.0.0 ---- +-------------------- + ### readdir(...) @@ -264,7 +270,8 @@ Return a list of files from the directory (not recursive) **Since:** 1.0.0 ---- +-------------------- + ### getUri(...) @@ -282,7 +289,8 @@ Return full File URI for a path and directory **Since:** 1.0.0 ---- +-------------------- + ### stat(...) @@ -300,7 +308,8 @@ Return data about a file **Since:** 1.0.0 ---- +-------------------- + ### rename(...) @@ -316,7 +325,8 @@ Rename a file or directory **Since:** 1.0.0 ---- +-------------------- + ### copy(...) @@ -334,7 +344,8 @@ Copy a file or directory **Since:** 1.0.0 ---- +-------------------- + ### checkPermissions() @@ -350,7 +361,8 @@ Required on Android, only when using `Directory.Documents`< **Since:** 1.0.0 ---- +-------------------- + ### requestPermissions() @@ -366,7 +378,8 @@ Required on Android, only when using `Directory.Documents`< **Since:** 1.0.0 ---- +-------------------- + ### downloadFile(...) @@ -384,7 +397,8 @@ Perform a http request to a server and download the file to the specified destin **Since:** 5.1.0 ---- +-------------------- + ### addListener('progress', ...) @@ -403,7 +417,8 @@ Add a listener to file download progress events. **Since:** 5.1.0 ---- +-------------------- + ### removeAllListeners() @@ -415,16 +430,19 @@ Remove all listeners for this plugin. **Since:** 5.2.0 ---- +-------------------- + ### Interfaces + #### ReadFileResult | Prop | Type | Description | Since | | ---------- | --------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | ----- | | **`data`** | string \| Blob | The representation of the data contained in the file Note: Blob is only available on Web. On native, the data is returned as a string. | 1.0.0 | + #### ReadFileOptions | Prop | Type | Description | Since | @@ -433,12 +451,14 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to read the file from | 1.0.0 | | **`encoding`** | Encoding | The encoding to read the file in, if not provided, data is read as binary and returned as base64 encoded. Pass Encoding.UTF8 to read data as string | 1.0.0 | + #### WriteFileResult | Prop | Type | Description | Since | | --------- | ------------------- | --------------------------------------- | ----- | | **`uri`** | string | The uri where the file was written into | 1.0.0 | + #### WriteFileOptions | Prop | Type | Description | Default | Since | @@ -449,6 +469,7 @@ Remove all listeners for this plugin. | **`encoding`** | Encoding | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass Encoding.UTF8 to write data as string | | 1.0.0 | | **`recursive`** | boolean | Whether to create any missing parent directories. | false | 1.0.0 | + #### AppendFileOptions | Prop | Type | Description | Since | @@ -458,6 +479,7 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to store the file in | 1.0.0 | | **`encoding`** | Encoding | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass Encoding.UTF8 to write data as string | 1.0.0 | + #### DeleteFileOptions | Prop | Type | Description | Since | @@ -465,6 +487,7 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to delete | 1.0.0 | | **`directory`** | Directory | The `Directory` to delete the file from | 1.0.0 | + #### MkdirOptions | Prop | Type | Description | Default | Since | @@ -473,6 +496,7 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to make the new directory in | | 1.0.0 | | **`recursive`** | boolean | Whether to create any missing parent directories as well. | false | 1.0.0 | + #### RmdirOptions | Prop | Type | Description | Default | Since | @@ -481,12 +505,14 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` to remove the directory from | | 1.0.0 | | **`recursive`** | boolean | Whether to recursively remove the contents of the directory | false | 1.0.0 | + #### ReaddirResult | Prop | Type | Description | Since | | ----------- | ----------------------- | -------------------------------------------------- | ----- | | **`files`** | FileInfo[] | List of files and directories inside the directory | 1.0.0 | + #### FileInfo | Prop | Type | Description | Since | @@ -498,6 +524,7 @@ Remove all listeners for this plugin. | **`mtime`** | number | Time of last modification in milliseconds. | 4.0.0 | | **`uri`** | string | The uri of the file. | 4.0.0 | + #### ReaddirOptions | Prop | Type | Description | Since | @@ -505,12 +532,14 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the directory to read | 1.0.0 | | **`directory`** | Directory | The `Directory` to list files from | 1.0.0 | + #### GetUriResult | Prop | Type | Description | Since | | --------- | ------------------- | ------------------- | ----- | | **`uri`** | string | The uri of the file | 1.0.0 | + #### GetUriOptions | Prop | Type | Description | Since | @@ -518,6 +547,7 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to get the URI for | 1.0.0 | | **`directory`** | Directory | The `Directory` to get the file under | 1.0.0 | + #### StatResult | Prop | Type | Description | Since | @@ -528,6 +558,7 @@ Remove all listeners for this plugin. | **`mtime`** | number | Time of last modification in milliseconds. | 1.0.0 | | **`uri`** | string | The uri of the file | 1.0.0 | + #### StatOptions | Prop | Type | Description | Since | @@ -535,6 +566,7 @@ Remove all listeners for this plugin. | **`path`** | string | The path of the file to get data about | 1.0.0 | | **`directory`** | Directory | The `Directory` to get the file under | 1.0.0 | + #### CopyOptions | Prop | Type | Description | Since | @@ -544,18 +576,21 @@ Remove all listeners for this plugin. | **`directory`** | Directory | The `Directory` containing the existing file or directory | 1.0.0 | | **`toDirectory`** | Directory | The `Directory` containing the destination file or directory. If not supplied will use the 'directory' parameter as the destination | 1.0.0 | + #### CopyResult | Prop | Type | Description | Since | | --------- | ------------------- | -------------------------------------- | ----- | | **`uri`** | string | The uri where the file was copied into | 4.0.0 | + #### PermissionStatus | Prop | Type | | ------------------- | ----------------------------------------------------------- | | **`publicStorage`** | PermissionState | + #### DownloadFileResult | Prop | Type | Description | Since | @@ -563,6 +598,7 @@ Remove all listeners for this plugin. | **`path`** | string | The path the file was downloaded to. | 5.1.0 | | **`blob`** | Blob | The blob data of the downloaded file. This is only available on web. | 5.1.0 | + #### DownloadFileOptions | Prop | Type | Description | Default | Since | @@ -572,12 +608,14 @@ Remove all listeners for this plugin. | **`progress`** | boolean | An optional listener function to receive downloaded progress events. If this option is used, progress event should be dispatched on every chunk received. Chunks are throttled to every 100ms on Android/iOS to avoid slowdowns. | | 5.1.0 | | **`recursive`** | boolean | Whether to create any missing parent directories. | false | 5.1.2 | + #### PluginListenerHandle | Prop | Type | | ------------ | ----------------------------------------- | | **`remove`** | () => Promise<void> | + #### ProgressStatus | Prop | Type | Description | Since | @@ -586,24 +624,30 @@ Remove all listeners for this plugin. | **`bytes`** | number | The number of bytes downloaded so far. | 5.1.0 | | **`contentLength`** | number | The total number of bytes to download for this file. | 5.1.0 | + ### Type Aliases + #### RenameOptions CopyOptions + #### PermissionState 'prompt' | 'prompt-with-rationale' | 'granted' | 'denied' + #### ProgressListener A listener function that receives progress events. (progress: ProgressStatus): void + ### Enums + #### Directory | Members | Value | Description | Since | @@ -615,6 +659,7 @@ A listener function that receives progress events. | **`External`** | 'EXTERNAL' | The external directory. On iOS it will use the Documents directory. On Android it's the directory on the primary shared/external storage device where the application can place persistent files it owns. These files are internal to the applications, and not typically visible to the user as media. Files will be deleted when the application is uninstalled. | 1.0.0 | | **`ExternalStorage`** | 'EXTERNAL_STORAGE' | The external storage directory. On iOS it will use the Documents directory. On Android it's the primary shared/external storage directory. It's not accesible on Android 10 unless the app enables legacy External Storage by adding `android:requestLegacyExternalStorage="true"` in the `application` tag in the `AndroidManifest.xml`. It's not accesible on Android 11 or newer. | 1.0.0 | + #### Encoding | Members | Value | Description | Since | diff --git a/preferences/README.md b/preferences/README.md index 3a0ec06e1..ff964790d 100644 --- a/preferences/README.md +++ b/preferences/README.md @@ -93,15 +93,15 @@ This method can also be used to store non-string values, such as numbers and boo -- [`configure(...)`](#configure) -- [`get(...)`](#get) -- [`set(...)`](#set) -- [`remove(...)`](#remove) -- [`clear()`](#clear) -- [`keys()`](#keys) -- [`migrate()`](#migrate) -- [`removeOld()`](#removeold) -- [Interfaces](#interfaces) +* [`configure(...)`](#configure) +* [`get(...)`](#get) +* [`set(...)`](#set) +* [`remove(...)`](#remove) +* [`clear()`](#clear) +* [`keys()`](#keys) +* [`migrate()`](#migrate) +* [`removeOld()`](#removeold) +* [Interfaces](#interfaces) @@ -124,7 +124,8 @@ Options that are `undefined` will not be used. **Since:** 1.0.0 ---- +-------------------- + ### get(...) @@ -142,7 +143,8 @@ Get the value from preferences of a given key. **Since:** 1.0.0 ---- +-------------------- + ### set(...) @@ -158,7 +160,8 @@ Set the value in preferences for a given key. **Since:** 1.0.0 ---- +-------------------- + ### remove(...) @@ -174,7 +177,8 @@ Remove the value from preferences for a given key, if any. **Since:** 1.0.0 ---- +-------------------- + ### clear() @@ -186,7 +190,8 @@ Clear keys and values from preferences. **Since:** 1.0.0 ---- +-------------------- + ### keys() @@ -200,7 +205,8 @@ Return the list of known keys in preferences. **Since:** 1.0.0 ---- +-------------------- + ### migrate() @@ -218,7 +224,8 @@ To remove the old data after being migrated, call removeOld(). **Since:** 1.0.0 ---- +-------------------- + ### removeOld() @@ -230,28 +237,33 @@ Removes old data with `_cap_` prefix from the Capacitor 2 Storage plugin. **Since:** 1.1.0 ---- +-------------------- + ### Interfaces + #### ConfigureOptions | Prop | Type | Description | Default | Since | | ----------- | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------- | ----- | | **`group`** | string | Set the preferences group. Preferences groups are used to organize key/value pairs. Using the value 'NativeStorage' provides backwards-compatibility with [`cordova-plugin-nativestorage`](https://www.npmjs.com/package/cordova-plugin-nativestorage). WARNING: The `clear()` method can delete unintended values when using the 'NativeStorage' group. | CapacitorStorage | 1.0.0 | + #### GetResult | Prop | Type | Description | Since | | ----------- | --------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ----- | | **`value`** | string \| null | The value from preferences associated with the given key. If a value was not previously set or was removed, value will be `null`. | 1.0.0 | + #### GetOptions | Prop | Type | Description | Since | | --------- | ------------------- | ------------------------------------------------- | ----- | | **`key`** | string | The key whose value to retrieve from preferences. | 1.0.0 | + #### SetOptions | Prop | Type | Description | Since | @@ -259,18 +271,21 @@ Removes old data with `_cap_` prefix from the Capacitor 2 Storage plugin. | **`key`** | string | The key to associate with the value being set in preferences. | 1.0.0 | | **`value`** | string | The value to set in preferences with the associated key. | 1.0.0 | + #### RemoveOptions | Prop | Type | Description | Since | | --------- | ------------------- | ----------------------------------------------- | ----- | | **`key`** | string | The key whose value to remove from preferences. | 1.0.0 | + #### KeysResult | Prop | Type | Description | Since | | ---------- | --------------------- | ------------------------------ | ----- | | **`keys`** | string[] | The known keys in preferences. | 1.0.0 | + #### MigrateResult | Prop | Type | Description | Since | From 6f5b45d31db2367a146c4a3e544a75385789e0db Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 10 Apr 2024 10:50:55 -0700 Subject: [PATCH 3/7] remove unnecessary comments --- preferences/README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/preferences/README.md b/preferences/README.md index ff964790d..fadcf9c8a 100644 --- a/preferences/README.md +++ b/preferences/README.md @@ -42,8 +42,6 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr - NSPrivacyTracking - NSPrivacyAccessedAPITypes @@ -52,7 +50,7 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr NSPrivacyAccessedAPICategoryUserDefaults NSPrivacyAccessedAPITypeReasons - CA92.1 + CA92.1 From 77f9836481a93484c4bc93dc51a93aab52f114a0 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Wed, 10 Apr 2024 10:54:51 -0700 Subject: [PATCH 4/7] remove unnecessary comments --- device/README.md | 4 +--- filesystem/README.md | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/device/README.md b/device/README.md index 71d16c20a..6fc73a5fe 100644 --- a/device/README.md +++ b/device/README.md @@ -28,8 +28,6 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr - NSPrivacyTracking - NSPrivacyAccessedAPITypes @@ -38,7 +36,7 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr NSPrivacyAccessedAPICategoryDiskSpace NSPrivacyAccessedAPITypeReasons - 85F4.1 + 85F4.1 diff --git a/filesystem/README.md b/filesystem/README.md index b71c2b150..cb534987e 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -28,8 +28,6 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr - NSPrivacyTracking - NSPrivacyAccessedAPITypes @@ -38,7 +36,7 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr NSPrivacyAccessedAPICategoryFileTimestamp NSPrivacyAccessedAPITypeReasons - C617.1 + C617.1 From 58a135c84f309949c757f5a89b418d5b748da9ac Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Mon, 15 Apr 2024 09:03:59 -0700 Subject: [PATCH 5/7] link to capacitor docs --- device/README.md | 6 ++---- filesystem/README.md | 6 ++---- preferences/README.md | 6 ++---- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/device/README.md b/device/README.md index 6fc73a5fe..56c7d3947 100644 --- a/device/README.md +++ b/device/README.md @@ -15,11 +15,9 @@ Apple mandates that app developers now specify approved reasons for API usage to 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. -### Manual Steps +For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest). -1. In Xcode, select File > New File. -2. Choose App Privacy File type under the Resource section. -3. After creation, edit `PrivacyInfo.xcprivacy` to add the necessary keys and reasons, as detailed in [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). +**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).** ### Example PrivacyInfo.xcprivacy diff --git a/filesystem/README.md b/filesystem/README.md index cb534987e..7cf86db57 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -15,11 +15,9 @@ Apple mandates that app developers now specify approved reasons for API usage to 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. -### Manual Steps +For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest). -1. In Xcode, select File > New File. -2. Choose App Privacy File type under the Resource section. -3. After creation, edit `PrivacyInfo.xcprivacy` to add the necessary keys and reasons, as detailed in [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). +**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryFileTimestamp](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393) and the recommended reason is [CA617.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393).** ### Example PrivacyInfo.xcprivacy diff --git a/preferences/README.md b/preferences/README.md index fadcf9c8a..d9ffcfd80 100644 --- a/preferences/README.md +++ b/preferences/README.md @@ -29,11 +29,9 @@ Apple mandates that app developers now specify approved reasons for API usage to 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. -### Manual Steps +For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest). -1. In Xcode, select File > New File. -2. Choose App Privacy File type under the Resource section. -3. After creation, edit `PrivacyInfo.xcprivacy` to add the necessary keys and reasons, as detailed in [Apple's documentation](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api). +**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryUserDefaults](hhttps://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).** ### Example PrivacyInfo.xcprivacy From aae2770f2f71511203f369779d101c753cb5a457 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Mon, 15 Apr 2024 09:10:22 -0700 Subject: [PATCH 6/7] typo --- filesystem/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filesystem/README.md b/filesystem/README.md index 7cf86db57..32c7ba2d9 100644 --- a/filesystem/README.md +++ b/filesystem/README.md @@ -17,7 +17,7 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest). -**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryFileTimestamp](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393) and the recommended reason is [CA617.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393).** +**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryFileTimestamp](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393) and the recommended reason is [C617.1](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api#4278393).** ### Example PrivacyInfo.xcprivacy From 32daf2f96096fd71e2b0b9199c8038df9604aa41 Mon Sep 17 00:00:00 2001 From: Chace Daniels Date: Mon, 15 Apr 2024 09:12:46 -0700 Subject: [PATCH 7/7] typo #2 --- preferences/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/preferences/README.md b/preferences/README.md index d9ffcfd80..94a64093e 100644 --- a/preferences/README.md +++ b/preferences/README.md @@ -31,7 +31,7 @@ When using this specific plugin in your app, you must create a `PrivacyInfo.xcpr For detailed steps on how to do this, please see the [Capacitor Docs](https://capacitorjs.com/docs/ios/privacy-manifest). -**For this plugin, the required dictionary key is [NSPrivacyAccessedAPICategoryUserDefaults](hhttps://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).** +**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).** ### Example PrivacyInfo.xcprivacy