Code Monkey home page Code Monkey logo

Comments (13)

thespacemanatee avatar thespacemanatee commented on June 8, 2024 27

This patch works for me:

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..f5fd6d5 100644
--- a/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
+++ b/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb
@@ -111,6 +111,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.

rodrigodiasf1984 avatar rodrigodiasf1984 commented on June 8, 2024 4

privacy_file_aggregation_enabled: false

something like this?

use_react_native!( privacy_file_aggregation_enabled: false :path => config[:reactNativePath], # An absolute path to your application root. :app_path => "#{Pod::Config.instance.installation_root}/.." )

from react-native.

phaniankur avatar phaniankur commented on June 8, 2024 3

Turning off privacy_file_aggregation_enabled: false has worked to complete the installation. For some reason the patch did not work as expected.

use_react_native!(
  privacy_file_aggregation_enabled: false,
  :path => config[:reactNativePath],
  # An absolute path to your application root.
  :app_path => "#{Pod::Config.instance.installation_root}/.." )

from react-native.

johnf avatar johnf commented on June 8, 2024 2

I've added a reproducer

from react-native.

cortinico avatar cortinico commented on June 8, 2024 2

@aleqsio @cipolleschi can we look at this as this is a newly introduced feature?

from react-native.

aleqsio avatar aleqsio commented on June 8, 2024 2

@rodrigodiasf1984

You can turn off the privacy manifest aggregation by adding privacy_file_aggregation_enabled: false to use_react_native! in your Podfile.

The fix for your issue should land in the next patch release.

from react-native.

lorenc-tomasz avatar lorenc-tomasz commented on June 8, 2024

I have this error when migrated from 0.73.8 to 0.74.1

[!] An error occurred while processing the post-install hook of the Podfile.

undefined method `end_with?' for nil:NilClass

/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `block in get_privacyinfo_file_path'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `each'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `find'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:85:in `get_privacyinfo_file_path'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:10:in `add_aggregated_privacy_manifest'
/Users/username/Desktop/Projects/nameA/App/node_modules/react-native/scripts/react_native_pods.rb:301:in `react_native_post_install'
/Users/username/Desktop/Projects/nameA/App/ios/Podfile:52:in `block (3 levels) in from_ruby'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:196:in `post_install!'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1013:in `run_podfile_post_install_hook'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1001:in `block in run_podfile_post_install_hooks'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in `message'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1000:in `run_podfile_post_install_hooks'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:337:in `block (2 levels) in create_and_save_projects'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:336:in `block in create_and_save_projects'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:183:in `integrate'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in `install!'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/Users/username/.rbenv/versions/2.7.6/lib/ruby/gems/2.7.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
/Users/username/.rbenv/versions/2.7.6/bin/pod:23:in `load'
/Users/username/.rbenv/versions/2.7.6/bin/pod:23:in `<main>'

from react-native.

lorenc-tomasz avatar lorenc-tomasz commented on June 8, 2024

I have created ticket with patch-file for mine issue: #44437

from react-native.

rodrigodiasf1984 avatar rodrigodiasf1984 commented on June 8, 2024

Same issue react-native 0.74.1

Generating Pods project
Setting USE_HERMES build settings
Setting REACT_NATIVE build settings
[Ccache]: Removing Ccache from CC, LD, CXX & LDPLUSPLUS build settings
[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.

no implicit conversion of nil into Array

/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:115:in +' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:115:in block (5 levels) in get_used_required_reason_apis'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in each' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:111:in block (4 levels) in get_used_required_reason_apis'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in each' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:106:in block (3 levels) in get_used_required_reason_apis'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:105:in each' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:105:in block (2 levels) in get_used_required_reason_apis'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:104:in each' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:104:in block in get_used_required_reason_apis'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:102:in each' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:102:in get_used_required_reason_apis'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:18:in add_aggregated_privacy_manifest' /Users/rodrigodiasdefigueiredo/Desktop/parksharing/node_modules/react-native/scripts/react_native_pods.rb:301:in react_native_post_install'
/Users/rodrigodiasdefigueiredo/Desktop/parksharing/ios/Podfile:36:in block (3 levels) in from_ruby' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-core-1.15.2/lib/cocoapods-core/podfile.rb:196:in post_install!'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1013:in run_podfile_post_install_hook' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1001:in block in run_podfile_post_install_hooks'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in message' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:1000:in run_podfile_post_install_hooks'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:337:in block (2 levels) in create_and_save_projects' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in write!'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:336:in block in create_and_save_projects' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in section'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:315:in create_and_save_projects' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:307:in generate_pods_project'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:183:in integrate' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in install!'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in run' /opt/homebrew/lib/ruby/gems/3.3.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run'
/opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in run' /opt/homebrew/lib/ruby/gems/3.3.0/gems/cocoapods-1.15.2/bin/pod:55:in <top (required)>'
/usr/local/bin/pod:25:in load' /usr/local/bin/pod:25:in

'

from react-native.

cipolleschi avatar cipolleschi commented on June 8, 2024

duplicated of #44400

from react-native.

cipolleschi avatar cipolleschi commented on June 8, 2024

New version of 0.74.2 is out and it should have all the fixes to the Privacy manifest we need!
We are going to release 0.73 and 0.72 in the next days with similar fixes!

Thank you everyone for the patience!

from react-native.

david-cahill avatar david-cahill commented on June 8, 2024

I've updated to 0.74.2 and unfortunately still seeing:

[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 `path' for nil:NilClass

from react-native.

cipolleschi avatar cipolleschi commented on June 8, 2024

@david-cahill could you add the rest of the stacktrace, please?

from react-native.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.