1

getting this error while pod install

NoMethodError - undefined method `=~' for [["PICKER_MEDIA=1"], ["PICKER_AUDIO=1"], ["PICKER_DOCUMENT=1"]]:Array

/usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:446:in block (2 levels) in merged_xcconfigs' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:446:in all?' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:446:in block in merged_xcconfigs' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:444:in each' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:444:in each_with_object' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:444:in merged_xcconfigs' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:1057:in block in <class:PodTargetSettings>' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:120:in block in define_build_settings_method' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:177:in block in remove_pod_target_xcconfig_overrides_from_target' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:174:in each' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:174:in remove_pod_target_xcconfig_overrides_from_target' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:157:in block in add_target' internal:kernel:90:in tap' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:156:in add_target' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:47:in block in install!' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in message' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:40:in install!' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:115:in block in install_pod_targets' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in map' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in install_pod_targets' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:32:in block in install_all_pod_targets' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:149:in message' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:31:in install_all_pod_targets' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:19:in generate!' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:314:in block in create_and_save_projects' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/user_interface.rb:64:in section' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:309:in create_and_save_projects' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:301:in generate_pods_project' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:180:in integrate' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/installer.rb:167:in install!' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/command/update.rb:63:in run' /usr/local/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in run' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/command.rb:52:in run' /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/bin/pod:55:in <top (required)>' /usr/local/bin/pod:25:in load' /usr/local/bin/pod:25:in '

4
  • Try running brew reinstall cocoapods, then go in your project, flutter clean and run the app through Android Studio as you would usuallly do. Commented Jan 11, 2023 at 9:16
  • this is not the solution please check my answer for the reference Commented Jan 11, 2023 at 17:49
  • Well your solution involves directly modifying the build settings config, it’s probably safer to reinstall cocoapods but if your solution worked then godspeed spiderman. Commented Jan 12, 2023 at 18:13
  • i tried to reinstall cocoapods but it didn't worked Commented Jan 14, 2023 at 12:00

2 Answers 2

1

Replace =~ with == in the file: /usr/local/lib/ruby/gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb

line: 446 -

after modification: values_are_bools = uniq_values.all? { |v| v == /\A(yes|no)\z/i }

It will work.

Ref: https://github.com/CocoaPods/CocoaPods/issues/11720#issuecomment-1378240043

Sign up to request clarification or add additional context in comments.

1 Comment

This solved it for me too, my path was: vim ~/.gem/ruby/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb
0

Try this it'll solve the issue

I got the same issue in this file gems/3.2.0/gems/cocoapods-1.11.3/lib/cocoapods/target/build_settings.rb:446:in `block (2 levels) in merged_xcconfigs' installing with gem
ruby 3.2.0
replacing "=~" by "==" seems to work but no idea if it has side effects I am just using this thing

1 Comment

Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.