Quantcast
Channel: Active questions tagged cocoapods - Stack Overflow
Viewing all articles
Browse latest Browse all 1028

Pod install issue in a flutter project : NoMethodError - undefined method `each' for nil

$
0
0

I try to set up the configuration to test my app on an emulator with xcode 16.

Command

```/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/bin/pod install --verbose```### Report* What did you do?* What did you expect to happen?* What happened instead?### Stack```   CocoaPods : 1.15.2        Ruby : ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [arm64-darwin23]    RubyGems : 3.5.18        Host : macOS 14.5 (23F79)       Xcode : 16.0 (16A242d)         Git : git version 2.46.2Ruby lib dir : /opt/homebrew/Cellar/ruby/3.3.5/libRepositories : trunk - CDN - https://cdn.cocoapods.org/```### Plugins```cocoapods-deintegrate : 1.0.5cocoapods-plugins     : 1.0.0cocoapods-search      : 1.0.1cocoapods-trunk       : 1.6.0cocoapods-try         : 1.2.0```### Podfile```rubyplatform :ios, '14.0'def flutter_root  generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)  unless File.exist?(generated_xcode_build_settings_path)    raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get    is executed first"  end  File.foreach(generated_xcode_build_settings_path) do |line|    matches = line.match(/FLUTTER_ROOT\=(.*)/)    return matches[1].strip if matches  end  raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub  get"endrequire File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)target 'Runner' do  project 'Runner', {'Debug' => 'Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig','Profile' => 'Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig','Release' => 'Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig'  }  use_frameworks! :linkage => :dynamic  use_modular_headers!  # Ajoute Firebase et Google Maps  pod 'GoogleMaps', :modular_headers => false  # Installer toutes les dépendances pour Flutter  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))  target 'RunnerTests' do    inherit! :search_paths  endend```### Error```NoMethodError - undefined method `each' for nil/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/target/pod_target.rb:846:in`_add_recursive_dependent_targets'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/target/pod_target.rb:833:in `block inrecursive_dependent_targets'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/target/pod_target.rb:832:in `map'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/target/pod_target.rb:832:in`recursive_dependent_targets'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:88:in`each'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:88:in`flat_map'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:88:in`block (2 levels) in verify_no_static_framework_transitive_dependencies'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:74:in`each_key'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:74:in`block in verify_no_static_framework_transitive_dependencies'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:73:in`each'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:73:in`verify_no_static_framework_transitive_dependencies'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/target_validator.rb:38:in`validate!'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:666:in `validate_targets'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:164:in `install!'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/command/install.rb:52:in `run'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/bin/pod:25:in `load'/opt/homebrew/Cellar/cocoapods/1.15.2_1/libexec/bin/pod:25:in `<main>'```

I try to uninstall cocoapod and install older stable version : 1.11.3 = same issue

I try multiple time :

rebuild the poject, remove dependancies and re install pods.

I have the same error each time at the end.

I'm a learning junior developper and this is my first ask on stack over flow. Do not hesitate to correct me if my ask isn't correctly build.

Please help me to solve this.


Viewing all articles
Browse latest Browse all 1028

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>