admin管理员组文章数量:1410696
Whenever I run pod install
on my React Native project I'm getting the following error:
An error occurred while processing the post-install hook of the Podfile.
undefined method `new_file' for #<Xcodeproj::Project::Object::PBXFileReference:0x0000000154ab6eb8>
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:74:in `ensure_reference'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:48:in `block in add_aggregated_privacy_manifest'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:47:in `each'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:47:in `add_aggregated_privacy_manifest'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/react_native_pods.rb:259:in `react_native_post_install'
/Users/AA/Downloads/F/F/ios/Podfile:67:in `block (3 levels) in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/podfile.rb:196:in `post_install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:1013:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:1001:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:149:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:1000:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:337:in `block (2 levels) in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:336:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:183:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:170:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
For further information, this is also the first time I'm running the project since updating to the latest Xcode iteration
I tried updating the react native version of the project, as well as the packages of the project, I was expecting that this would remedy the issue however it persists
I have also tried downgrading cocoapods
Whenever I run pod install
on my React Native project I'm getting the following error:
An error occurred while processing the post-install hook of the Podfile.
undefined method `new_file' for #<Xcodeproj::Project::Object::PBXFileReference:0x0000000154ab6eb8>
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:74:in `ensure_reference'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:48:in `block in add_aggregated_privacy_manifest'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:47:in `each'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/cocoapods/privacy_manifest_utils.rb:47:in `add_aggregated_privacy_manifest'
/Users/AA/Downloads/F/F/node_modules/react-native/scripts/react_native_pods.rb:259:in `react_native_post_install'
/Users/AA/Downloads/F/F/ios/Podfile:67:in `block (3 levels) in from_ruby'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.16.2/lib/cocoapods-core/podfile.rb:196:in `post_install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:1013:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:1001:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:149:in `message'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:1000:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:337:in `block (2 levels) in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer/xcode/pods_project_generator/pods_project_writer.rb:61:in `write!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:336:in `block in create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:183:in `integrate'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/installer.rb:170:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.16.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
For further information, this is also the first time I'm running the project since updating to the latest Xcode iteration
I tried updating the react native version of the project, as well as the packages of the project, I was expecting that this would remedy the issue however it persists
I have also tried downgrading cocoapods
Share Improve this question edited Mar 4 at 12:57 Andrew1024 asked Mar 4 at 12:50 Andrew1024Andrew1024 1961 gold badge3 silver badges16 bronze badges1 Answer
Reset to default 0To fix this error, simply delete the entire node_modules folder and the ios/Pods folder, and then replace your entire Podfile with a default one from a brand-new React Native project.
本文标签:
版权声明:本文标题:xcode - Error when processing post install hook: undefined method `new_file' for #<Xcodeproj::Project::Object::PB 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745042354a2639153.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论