25LucasAnselmo / gr_zoom

Apache License 2.0
5 stars 15 forks source link

unable to installs pod for ios #19

Open NileshTech opened 6 months ago

NileshTech commented 6 months ago

while doing "pod install" getting following error

Command

/Users/nileshpayghan/.gem/bin/pod update

Report

Stack

   CocoaPods : 1.15.2
        Ruby : ruby 3.2.0 (2022-12-25 revision a528908271) [arm64-darwin22]
    RubyGems : 3.5.10
        Host : macOS 14.4.1 (23E224)
       Xcode : 15.3 (15E204a)
         Git : git version 2.39.3 (Apple Git-146)
Ruby lib dir : /opt/homebrew/Cellar/ruby/3.2.0/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.1
cocoapods-trunk       : 1.6.0
cocoapods-try         : 1.2.0

Podfile

# Uncomment this line to define a global platform for your project
platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
ENV['SWIFT_VERSION'] = '5'

project 'Runner', {
  'Debug' => :debug,
  'Profile' => :release,
  'Release' => :release,
}

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"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 

flutter_ios_podfile_setup

target 'Runner' do
  use_frameworks!
  use_modular_headers!

  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
    if target.name == "gr_zoom"
      puts("Found target membership zoom.")
      all_filerefs = installer.pods_project.files
      all_filerefs.each do |fileref|
        if fileref.path.end_with? "MobileRTC.xcframework"
          puts("Found MobileRTC.xcframework fileref.")
          build_phase = target.frameworks_build_phase
          puts("Determining if zoom build phase needs correction.")
          unless build_phase.files_references.include?(fileref)
            puts("Adding MobileRTC.xcframework to zoom target")
            build_phase.add_file_reference(fileref)
          end
        end
      end
      installer.pods_project.build_configurations.each do |config|
        config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"] = "arm64"
      end
    end
    target.build_configurations.each do |config|
      config.build_settings['ENABLE_BITCODE'] = 'NO'
    end
  end
end

Error

NoMethodError - undefined method `size' for nil:NilClass
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/macho_file.rb:459:in `populate_mach_header'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/macho_file.rb:240:in `populate_fields'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/macho_file.rb:66:in `initialize_from_bin'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/macho_file.rb:40:in `new_from_bin'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/fat_file.rb:371:in `block in populate_machos'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/fat_file.rb:370:in `each'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/fat_file.rb:370:in `populate_machos'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/fat_file.rb:162:in `populate_fields'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho/fat_file.rb:100:in `initialize'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho.rb:35:in `new'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/ruby-macho-2.5.1/lib/macho.rb:35:in `open'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/xcode/linkage_analyzer.rb:16:in `dynamic_binary?'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/xcode/xcframework/xcframework_slice.rb:113:in `build_type'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/xcode/xcframework/xcframework_slice.rb:106:in `dynamic?'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1187:in `each'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1187:in `partition'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1187:in `block (2 levels) in validate_xcframeworks'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1168:in `each'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1168:in `block in validate_xcframeworks'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1167:in `each_value'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:1167:in `validate_xcframeworks'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:67:in `block in install!'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in `message'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator/pod_target_installer.rb:40:in `install!'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:115:in `block in install_pod_targets'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in `map'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/pods_project_generator.rb:112:in `install_pod_targets'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:32:in `block in install_all_pod_targets'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:149:in `message'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:31:in `install_all_pod_targets'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer/xcode/single_pods_project_generator.rb:19:in `generate!'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:320:in `block in create_and_save_projects'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/user_interface.rb:64:in `section'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:315:in `create_and_save_projects'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:307:in `generate_pods_project'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:183:in `integrate'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/installer.rb:170:in `install!'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/command/update.rb:63:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/lib/cocoapods/command.rb:52:in `run'
/opt/homebrew/lib/ruby/gems/3.2.0/gems/cocoapods-1.15.2/bin/pod:55:in `<top (required)>'
/Users/nileshpayghan/.gem/bin/pod:25:in `load'
/Users/nileshpayghan/.gem/bin/pod:25:in `<main>'

――― TEMPLATE END ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

[!] Oh no, an error occurred.

Search for existing GitHub issues similar to yours: https://github.com/CocoaPods/CocoaPods/search?q=undefined+method+%60size%27+for+nil%3ANilClass&type=Issues

If none exists, create a ticket, with the template displayed above, on: https://github.com/CocoaPods/CocoaPods/issues/new

Be sure to first read the contributing guide for details on how to properly submit a ticket: https://github.com/CocoaPods/CocoaPods/blob/master/CONTRIBUTING.md

Don't forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods...

and 11 more at: https://github.com/cocoapods/cocoapods/search?q=undefined%20method%20%60size%27%20for%20nil&type=Issues&utf8=✓

25LucasAnselmo commented 5 months ago

Trying to delete your Podfile.lock and run pod deintegrate; pod setup and pod install