Comments (14)
Mine patch file:
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..7fd3d61 100644
--- a/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
+++ b/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
@@ -21,6 +21,7 @@ module PrivacyManifestUtils
get_core_accessed_apis.each do |accessed_api|
api_type = accessed_api["NSPrivacyAccessedAPIType"]
reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
+ next if api_type.nil? || reasons.nil?
required_reason_apis[api_type] ||= []
required_reason_apis[api_type] += reasons
end
@@ -29,6 +30,7 @@ module PrivacyManifestUtils
(privacy_info["NSPrivacyAccessedAPITypes"] || []).each do |accessed_api|
api_type = accessed_api["NSPrivacyAccessedAPIType"]
reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
+ next if api_type.nil? || reasons.nil?
# Add reasons from existing PrivacyInfo file to the ones from pods
required_reason_apis[api_type] ||= []
required_reason_apis[api_type] += reasons
@@ -67,7 +69,7 @@ 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|
@@ -79,9 +81,11 @@ module PrivacyManifestUtils
end
def self.get_privacyinfo_file_path(user_project, targets)
+ puts "Debug: Entering get_privacyinfo_file_path function"
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
+ puts "Debug: Found existing file: #{existing_file.real_path}"
return existing_file.real_path
end
@@ -90,9 +94,11 @@ module PrivacyManifestUtils
if info_plist_path.nil?
# return path that is sibling to .xcodeproj
path = user_project.path
- return File.join(File.dirname(path), "PrivacyInfo.xcprivacy")
+ puts "Debug: info_plist_path is nil, using user_project.path: #{path}"
+ return File.join(File.dirname(path), "PrivacyInfo.xcprivacy") unless path.nil?
end
- return File.join(File.dirname(info_plist_path.real_path),"PrivacyInfo.xcprivacy")
+ puts "Debug: Found info_plist_path: #{info_plist_path.real_path}"
+ return File.join(File.dirname(info_plist_path.real_path),"PrivacyInfo.xcprivacy") unless info_plist_path.real_path.nil?
end
def self.get_used_required_reason_apis(installer)
@@ -111,6 +117,7 @@ module PrivacyManifestUtils
accessed_api_types.each do |accessed_api|
api_type = accessed_api["NSPrivacyAccessedAPIType"]
reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
+ next if api_type.nil? || reasons.nil?
used_apis[api_type] ||= []
used_apis[api_type] += reasons
end
from react-native.
@aleqsio @cipolleschi can you look at this, please? :)
from react-native.
@david-cahill Likely next week. We have been busy working on the React Conf the past two weeks, so we could not dedicate any time to anything else, unfortunately. This week we have internal events plus the AppJS conf that are going to slow down the releases a bit. Next week we should be back to normal.
from react-native.
I think we're looking to merge #44410 to fix this issue, no?
from react-native.
We have a fix ready with #44400. It has landed already in main, we need to release patched versions of React Native.
I'll keep the issue open for discoverability.
from react-native.
Same for me although slightly different error:-
[Privacy Manifest Aggregation] Appending aggregated reasons to existing PrivacyInfo.xcprivacy file. [Privacy Manifest Aggregation] Reading .xcprivacy files to aggregate all used Required Reason APIs. [!] An error occurred while processing the post-install hook of the Podfile. undefined method 'each' for nil:NilClass /Users/x/Development/x/mobile_v3/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in 'block (4 levels) in get_used_required_reason_apis' /Users/x/Development/x/mobile_v3/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in 'each'
Reverting back to RN 0.74.0 and all is fine.
I assume Apple will reject any submissions as we're past the 1st of May deadline for getting the privacy manifest sorted out and 0.74.0 wasn't merging these properly in the first place (from other 3rd party libs)?
I am seeing the same error, and this has not been fixed by the linked PRs, so here is another one for this specific issue (manifest without a NSPrivacyAccessedAPITypes
key): #44628
from react-native.
Added repro repo :)
from react-native.
I can confirm it's happening for me, latest Xcode and MacOs.
from react-native.
Same for me although slightly different error:-
[Privacy Manifest Aggregation] Appending aggregated reasons to existing PrivacyInfo.xcprivacy file.
[Privacy Manifest Aggregation] Reading .xcprivacy files to aggregate all used Required Reason APIs.
[!] An error occurred while processing the post-install hook of the Podfile.
undefined method 'each' for nil:NilClass
/Users/x/Development/x/mobile_v3/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in 'block (4 levels) in get_used_required_reason_apis'
/Users/x/Development/x/mobile_v3/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in 'each'
Reverting back to RN 0.74.0 and all is fine.
I assume Apple will reject any submissions as we're past the 1st of May deadline for getting the privacy manifest sorted out and 0.74.0 wasn't merging these properly in the first place (from other 3rd party libs)?
from react-native.
Hi @cipolleschi,
44400 closes issue with Dic
. The mentioned issue here is connected with get_privacyinfo_file_path
and I have no idea why file_refs doesn't have a path property.
from react-native.
Thank you for answer @aleqsio. I didn't notice this PR :(
from react-native.
@cipolleschi Any idea when this might be released? Thanks!
from react-native.
@david-cahill Likely next week. We have been busy working on the React Conf the past two weeks, so we could not dedicate any time to anything else, unfortunately. This week we have internal events plus the AppJS conf that are going to slow down the releases a bit. Next week we should be back to normal.
I wanted to go to the App JS conference (2 hours by car) but the company refused my request :(
from react-native.
For me this did the fix:
next if accessed_api_types.nil? || accessed_api_types.nil?
from react-native.
Related Issues (20)
- Library not loaded: '@rpath/FBLPromises.framework/FBLPromises' Referenced from HOT 5
- Socket Rocket Upgrade to 0.7.0 in react native version 0.73 HOT 4
- Image .gif frame timing off-by-one error in iOS HOT 2
- Pressable gets stuck under the new architecture HOT 2
- How to run react native custom library inside react native project without publishing to npm? Local setup steps are not working. HOT 3
- NSInvalidArgumentException __76-[RCTModalHostViewManager presentModalHostView:withViewController:animated:]_block_invoke.38 Application tried to present modally a view controller <RCTModalHostViewController: 0x7fcf53855110> that is already being presented by <UIViewController: 0x7fcf4791 HOT 7
- UI problem with iOS floating keyboard in iPad - 0.73.7 HOT 4
- React-Codegen Error when build iOS HOT 3
- [codegen] inconsistent use of `toSafeCppString` in `generateEnum` (GenerateModuleH.js) HOT 1
- Implement requestIdleCallback and cancelIdleCallback on the new architecture HOT 7
- Some touchable components are not working (Native Android devices only) HOT 5
- [iOS] Data race as a result of concurrent access to NativeToJsBridge::m_batchHadNativeModuleOrTurboModuleCalls
- APP Crash in production HOT 1
- Network Error when send file with formData(axios or fetch) on Android. Works fine on IOS. HOT 1
- Render error: useAuth must be used within an AuthProvider HOT 1
- @react-native/babel-preset imports from react-native not deferred (lazy requires) HOT 1
- i need help for Animated.View .ValueXY HOT 1
- BackHandler Does Not Work Google Pixel HOT 2
- Android FlatList with borderRadius applied does not respect border to clip list items on Android HOT 3
- Intl.NumberFormat does not support strings 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.