Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Privacy manifest empty dict #44402

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
27 changes: 14 additions & 13 deletions packages/react-native/scripts/cocoapods/privacy_manifest_utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,21 +99,22 @@ def self.get_used_required_reason_apis(installer)
installer.pod_targets.each do |pod_target|
# puts pod_target
pod_target.file_accessors.each do |file_accessor|
file_accessor.resource_bundles.each do |bundle_name, bundle_files|
bundle_files.each do |file_path|
# This needs to be named like that due to apple requirements
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
file_accessor.resource_bundles.each do |bundle_name, bundle_files|
bundle_files.each do |file_path|
# This needs to be named like that due to apple requirements
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"]
next unless api_type
reasons = accessed_api["NSPrivacyAccessedAPITypeReasons"]
used_apis[api_type] ||= []
used_apis[api_type] += reasons
end
end
end
end
end
end
end
end
return used_apis
Expand Down