Skip to content

Commit

Permalink
chore(deps): patch react-native-cookies with privacy policy (#5332)
Browse files Browse the repository at this point in the history
### Description

This PR puts the following change into a patch:
https://github.com/react-native-cookies/cookies/pull/189/files - the
last publish for this lib was 2 years ago and I am concerned that this
will not be published in time.

### Test plan

n/a

### Related issues

- Related to RET-1058

### Backwards compatibility

Y

### Network scalability

If a new NetworkId and/or Network are added in the future, the changes
in this PR will:

- [x] Continue to work without code changes, OR trigger a compilation
error (guaranteeing we find it when a new network is added)
  • Loading branch information
kathaypacific committed Apr 25, 2024
1 parent c2ffb18 commit ceba569
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1211,7 +1211,7 @@ SPEC CHECKSUMS:
react-native-compat: c741279b875109d2d9fc8da22e80c00ef91311a6
react-native-config: 86038147314e2e6d10ea9972022aa171e6b1d4d8
react-native-contacts: fd1614c74777089ebb6b0a0e3847dd78130ef9f4
react-native-cookies: f54fcded06bb0cda05c11d86788020b43528a26c
react-native-cookies: 672b2431ca44da2e2942af086d0c83aae42b989a
react-native-fast-crypto: db61bcb2d1224a180449b886f27426a67d7628c0
react-native-flipper: b9e2e817604af8da0d5a9ba20a8516e780e30f3c
react-native-get-random-values: 21325b2244dfa6b58878f51f9aa42821e7ba3d06
Expand Down
2 changes: 2 additions & 0 deletions ios/celo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@
"${PODS_CONFIGURATION_BUILD_DIR}/TOCropViewController/TOCropViewControllerBundle.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/lottie-ios/LottiePrivacyInfo.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/lottie-react-native/Lottie_React_Native_Privacy.bundle",
"${PODS_CONFIGURATION_BUILD_DIR}/react-native-cookies/RNCookiePrivacyInfo.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
Expand All @@ -651,6 +652,7 @@
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/TOCropViewControllerBundle.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/LottiePrivacyInfo.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/Lottie_React_Native_Privacy.bundle",
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RNCookiePrivacyInfo.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
Expand Down
71 changes: 71 additions & 0 deletions patches/@react-native-cookies+cookies+6.2.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
diff --git a/node_modules/@react-native-cookies/cookies/ios/PrivacyInfo.xcprivacy b/node_modules/@react-native-cookies/cookies/ios/PrivacyInfo.xcprivacy
new file mode 100644
index 0000000..6c7b849
--- /dev/null
+++ b/node_modules/@react-native-cookies/cookies/ios/PrivacyInfo.xcprivacy
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>NSPrivacyCollectedDataTypes</key>
+ <array>
+ <dict>
+ <key>NSPrivacyCollectedDataType</key>
+ <string>NSPrivacyCollectedDataTypeOtherDataTypes</string>
+ <key>NSPrivacyCollectedDataTypeLinked</key>
+ <false/>
+ <key>NSPrivacyCollectedDataTypeTracking</key>
+ <false/>
+ <key>NSPrivacyCollectedDataTypePurposes</key>
+ <array>
+ <string>NSPrivacyCollectedDataTypePurposeAppFunctionality</string>
+ </array>
+ </dict>
+ </array>
+ <key>NSPrivacyAccessedAPITypes</key>
+ <array>
+ <dict>
+ <key>NSPrivacyAccessedAPIType</key>
+ <string>NSPrivacyAccessedAPICategoryUserDefaults</string>
+ <key>NSPrivacyAccessedAPITypeReasons</key>
+ <array>
+ <string>CA92.1</string>
+ </array>
+ </dict>
+ </array>
+</dict>
+</plist>
\ No newline at end of file
diff --git a/node_modules/@react-native-cookies/cookies/ios/RNCookieManagerIOS.xcodeproj/project.pbxproj b/node_modules/@react-native-cookies/cookies/ios/RNCookieManagerIOS.xcodeproj/project.pbxproj
index d93a306..facf90c 100644
--- a/node_modules/@react-native-cookies/cookies/ios/RNCookieManagerIOS.xcodeproj/project.pbxproj
+++ b/node_modules/@react-native-cookies/cookies/ios/RNCookieManagerIOS.xcodeproj/project.pbxproj
@@ -30,6 +30,7 @@
6CDA467A38779CEFE54AF652 /* Pods-RNCookieManagerIOS.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNCookieManagerIOS.debug.xcconfig"; path = "Target Support Files/Pods-RNCookieManagerIOS/Pods-RNCookieManagerIOS.debug.xcconfig"; sourceTree = "<group>"; };
7A3E91C9DB889DAEAB299FB5 /* Pods_RNCookieManagerIOS.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RNCookieManagerIOS.framework; sourceTree = BUILT_PRODUCTS_DIR; };
AC0CCEFD0D5DDBC08A3F9FDB /* Pods-RNCookieManagerIOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RNCookieManagerIOS.release.xcconfig"; path = "Target Support Files/Pods-RNCookieManagerIOS/Pods-RNCookieManagerIOS.release.xcconfig"; sourceTree = "<group>"; };
+ F29511B12BBF92D200DF6087 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
@@ -55,6 +56,7 @@
1BD725CD1CF7795C005DBD79 = {
isa = PBXGroup;
children = (
+ F29511B12BBF92D200DF6087 /* PrivacyInfo.xcprivacy */,
1BD725FF1CF77DD1005DBD79 /* RNCookieManagerIOS */,
1BD725DB1CF77A8B005DBD79 /* Products */,
71405C5FF90D2ACAB4F0366B /* Pods */,
diff --git a/node_modules/@react-native-cookies/cookies/react-native-cookies.podspec b/node_modules/@react-native-cookies/cookies/react-native-cookies.podspec
index ec1b754..d8954f3 100644
--- a/node_modules/@react-native-cookies/cookies/react-native-cookies.podspec
+++ b/node_modules/@react-native-cookies/cookies/react-native-cookies.podspec
@@ -15,4 +15,7 @@ Pod::Spec.new do |s|
s.preserve_paths = "*.framework"
s.source_files = "ios/**/*.{h,m}"
s.dependency "React-Core"
+ s.resource_bundles = {
+ 'RNCookiePrivacyInfo' => ['ios/PrivacyInfo.xcprivacy'],
+ }
end

0 comments on commit ceba569

Please sign in to comment.