Skip to content

Commit 80eeb50

Browse files
committed
feat(ios): add a default iOS privacyManifest
Closes #2674
1 parent a0d305f commit 80eeb50

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

boilerplate/app.config.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,23 @@ module.exports = ({ config }: ConfigContext): Partial<ExpoConfig> => {
1717

1818
return {
1919
...config,
20+
ios: {
21+
...config.ios,
22+
// This privacyManifests is to get you started.
23+
// See Expo's guide on apple privacy manifests here:
24+
// https://docs.expo.dev/guides/apple-privacy/
25+
// You may need to add more privacy manifests depending on your app's usage of APIs.
26+
// More details and a list of "required reason" APIs can be found in the Apple Developer Documentation.
27+
// https://developer.apple.com/documentation/bundleresources/privacy-manifest-files
28+
privacyManifests: {
29+
NSPrivacyAccessedAPITypes: [
30+
{
31+
NSPrivacyAccessedAPIType: "NSPrivacyAccessedAPICategoryUserDefaults",
32+
NSPrivacyAccessedAPITypeReasons: ["CA92.1"], // CA92.1 = "Access info from same app, per documentation"
33+
},
34+
],
35+
},
36+
},
2037
plugins: [...existingPlugins, require("./plugins/withSplashScreen").withSplashScreen],
2138
}
2239
}

test/vanilla/ignite-new.test.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,12 @@ describe("ignite new", () => {
6666
expect(templates).toContain("app-icon")
6767
})
6868

69+
it("should have created an apple privacy manifest file", () => {
70+
// now let's examine the spun-up app
71+
const dirs = filesystem.list(appPath + `/ios/${APP_NAME}/`)
72+
expect(dirs).toContain("PrivacyInfo.xcprivacy")
73+
})
74+
6975
it(`should have renamed all permutations of hello-world to ${APP_NAME}`, async () => {
7076
// react-native-rename doesn't always catch everything, so we need to check for
7177
// any instances and fail if it doesn't work

0 commit comments

Comments
 (0)