From 520d120375c6b24bc161adea4f48d76537a34abc Mon Sep 17 00:00:00 2001 From: Phillip Pan Date: Tue, 2 Apr 2024 21:38:52 -0700 Subject: [PATCH] add privacy manifest to hello world template Summary: Changelog: [iOS][Added] this change will be included in the RN CLI. so all new apps running the RN CLI to get created will get this manifest. the reasons have been added for the following APIs: NSPrivacyAccessedAPICategoryFileTimestamp - C617.1: We use fstat and stat in a few places in the C++ layer. We use these to read information about the JavaScript files in RN. NSPrivacyAccessedAPICategoryUserDefaults - CA92.1: We access NSUserDefaults in a few places. 1) To store RTL preferences 2) As part of caching server URLs for developer mode 3) A generic native module that wraps NSUserDefaults NSPrivacyAccessedAPICategorySystemBootTime - 35F9.1: Best guess reason from RR API pulled in by boost Reviewed By: cipolleschi Differential Revision: D53682756 fbshipit-source-id: 0426fe0002a3bc8b45ef24053ac4228c9f61eb85 --- .../ios/HelloWorld.xcodeproj/project.pbxproj | 2 + .../ios/HelloWorld/PrivacyInfo.xcprivacy | 38 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 packages/react-native/template/ios/HelloWorld/PrivacyInfo.xcprivacy diff --git a/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj b/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj index d059f8e4f5fb7c..40b32ffd09ec6c 100644 --- a/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj +++ b/packages/react-native/template/ios/HelloWorld.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = HelloWorld/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = HelloWorld/main.m; sourceTree = ""; }; + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = HelloWorld/PrivacyInfo.xcprivacy; sourceTree = ""; }; 19F6CBCC0A4E27FBF8BF4A61 /* libPods-HelloWorld-HelloWorldTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-HelloWorld-HelloWorldTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 3B4392A12AC88292D35C810B /* Pods-HelloWorld.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.debug.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.debug.xcconfig"; sourceTree = ""; }; 5709B34CF0A7D63546082F79 /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = ""; }; @@ -92,6 +93,7 @@ 13B07FB61A68108700A75B9A /* Info.plist */, 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 13B07FB71A68108700A75B9A /* main.m */, + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, ); name = HelloWorld; sourceTree = ""; diff --git a/packages/react-native/template/ios/HelloWorld/PrivacyInfo.xcprivacy b/packages/react-native/template/ios/HelloWorld/PrivacyInfo.xcprivacy new file mode 100644 index 00000000000000..ef1896e70c88da --- /dev/null +++ b/packages/react-native/template/ios/HelloWorld/PrivacyInfo.xcprivacy @@ -0,0 +1,38 @@ + + + + + NSPrivacyCollectedDataTypes + + + NSPrivacyAccessedAPITypes + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryFileTimestamp + NSPrivacyAccessedAPITypeReasons + + C617.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategoryUserDefaults + NSPrivacyAccessedAPITypeReasons + + CA92.1 + + + + NSPrivacyAccessedAPIType + NSPrivacyAccessedAPICategorySystemBootTime + NSPrivacyAccessedAPITypeReasons + + 35F9.1 + + + + NSPrivacyTracking + + +