expo-privacy-manifest-polyfill-plugin
v0.0.2
Published
Config plugin for configuring Apple privacy manifests in SDK49 and below
Downloads
2,226
Readme
expo-privacy-manifest-polyfill-plugin
Expo Config Plugin to configure Apple privacy manifests in SDK49 and below.
For SDK50+, the plugin lives in @expo/config-plugins and can be used by default.
Learn more: https://docs.expo.dev/guides/apple-privacy/
Expo installation
This package cannot be used in the "Expo Go" app because it requires custom native code.
First install the package with yarn, npm, or npx expo install
.
npx expo install expo-privacy-manifest-polyfill-plugin
After installing this npm package, add the config plugin to the plugins
array of your app.json
or app.config.js
:
{
"expo": {
"plugins": ["expo-privacy-manifest-polyfill-plugin"]
}
}
Next, rebuild your app as described in the "Adding custom native code" guide.
Example
Use the NSPrivacyAccessedAPIType
and NSPrivacyAccessedAPITypeReasons
values listed in https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api.
{
"expo": {
"name": "My App",
"slug": "my-app",
// ...
"ios": {
"privacyManifests": {
"NSPrivacyAccessedAPITypes": [
{
"NSPrivacyAccessedAPIType": "NSPrivacyAccessedAPICategoryUserDefaults",
"NSPrivacyAccessedAPITypeReasons": ["CA92.1"]
}
]
}
}
}
}