Comments (1)
Looks like its already solved in main.
Patch to make it work:
diff --git a/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb b/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
index 7600829..220d5d5 100644
--- a/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
+++ b/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
@@ -67,12 +67,10 @@ module PrivacyManifestUtils
end
def self.ensure_reference(file_path, user_project, target)
- reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref.path.end_with? "PrivacyInfo.xcprivacy" }
+ reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref.path&.end_with? "PrivacyInfo.xcprivacy" }
unless reference_exists
# We try to find the main group, but if it doesn't exist, we default to adding the file to the project root – both work
- file_root = user_project.root_object.main_group.children.find { |group|
- group.class == Xcodeproj::Project::Object::PBXGroup && (group.name == target.name || group.path == target.name)
- } || user_project
+ file_root = user_project.root_object.main_group.children.find { |group| group.class == Xcodeproj::Project::Object::PBXGroup && (group.name == target.name || group.path == target.name) } || user_project
file_ref = file_root.new_file(file_path)
build_file = target.resources_build_phase.add_file_reference(file_ref, true)
end
@@ -80,11 +78,10 @@ module PrivacyManifestUtils
def self.get_privacyinfo_file_path(user_project, targets)
file_refs = targets.flat_map { |target| target.resources_build_phase.files_references }
- existing_file = file_refs.find { |file_ref| file_ref.path.end_with? "PrivacyInfo.xcprivacy" }
+ existing_file = file_refs.find { |file_ref| file_ref.path&.end_with? "PrivacyInfo.xcprivacy" }
if existing_file
return existing_file.real_path
end
-
# We try to find a file we know exists in the project to get the path to the main group directory
info_plist_path = user_project.files.find { |file_ref| file_ref.name == "Info.plist" }
if info_plist_path.nil?
@@ -108,11 +105,12 @@ module PrivacyManifestUtils
if File.basename(file_path) == 'PrivacyInfo.xcprivacy'
content = Xcodeproj::Plist.read_from_path(file_path)
accessed_api_types = content["NSPrivacyAccessedAPITypes"]
- accessed_api_types.each do |accessed_api|
- api_type = accessed_api["NSPrivacyAccessedAPIType"]
- reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
- used_apis[api_type] ||= []
- used_apis[api_type] += reasons
+ accessed_api_types&.each do |accessed_api|
+ api_type = accessed_api["NSPrivacyAccessedAPIType"]
+ reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
+ next unless api_type
+ used_apis[api_type] ||= []
+ used_apis[api_type] += reasons
end
end
end
from react-native.
Related Issues (20)
- Error with react-native-compat + Expo Go crashes on iOS when trying to create a Web3Wallet instance HOT 3
- Layout breaks when UIContextMenuInteraction is used with the new architecture HOT 1
- NullPointerException: Attempt to invoke virtual method 'JavaTimerManager$IdleCallbackRunnable.cancel()' on a null object reference HOT 4
- Cycle in dependencies between targets ‘XYZ' and ‘XYZ_appTests' in Xcode for React Native project on macOS HOT 3
- 🐛 TextInput:Function components cannot be given refs HOT 4
- iOS textContentType suggestion are trimmed with maxLength, and can't be overridden. HOT 2
- Production Crash - Fatal Exception: java.lang.UnsatisfiedLinkError HOT 3
- RN The official scaffolding project introduced bundlejs and modified it again, but the hot update could not be triggered HOT 5
- Downloading template error HOT 3
- Old architecture i new architecture IOS onLoad Image prop HOT 2
- Pod Install Giving an error
- Accessibility broken for multi-line TextInput focus accessibility (since 0.71)
- RN The official scaffolding project introduced bundlejs and modified it again, but the hot update could not be triggered HOT 5
- Emojis are clipped when using certain combinations of `fontFamily`, `fontSize` and `lineHeight` HOT 2
- (INFO | Storing crashdata in: C:\Users\<>\AppData Problems running react-native android, caused by the emulator. (Windows) HOT 2
- Not able to run my react-native app HOT 3
- useWindowDimensions does not work for Expo 51 HOT 2
- Android Talkback - Checkbox accessibility state stuck with announcing "mixed" once the mixed state is introduced HOT 2
- codegen - 0.74: Int32 | null generates Nullable Integer on java side, but Ljava/lang/Double on c++ side. HOT 12
- `maxLength` of TextInput does not work when value is changed after state update HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-native.