0

i have flutter app when i try run in mac i get error Pod Install and i try install pod by run this command in ios folder

pod install

i get this issue

Analyzing dependencies
cloud_firestore: Using Firebase SDK version '8.5.0' defined in 'firebase_core'
firebase_auth: Using Firebase SDK version '8.5.0' defined in 'firebase_core'
firebase_core: Using Firebase SDK version '8.5.0' defined in 'firebase_core'
firebase_messaging: Using Firebase SDK version '8.5.0' defined in 'firebase_core'
firebase_storage: Using Firebase SDK version '8.5.0' defined in 'firebase_core'

――― MARKDOWN TEMPLATE ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

stack

   CocoaPods : 1.11.0.beta.2
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin20]
    RubyGems : 3.2.25
        Host : macOS 11.5.1 (20G80)
       Xcode : 12.5.1 (12E507)
         Git : git version 2.30.1 (Apple Git-130)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

Plugins

cocoapods-clean       : 0.0.1
cocoapods-deintegrate : 1.0.5
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.5.0
cocoapods-try         : 1.2.0

Pod file

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

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

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

Error

JSON::ParserError - 416: unexpected token at '"src/core/ext/filters/client_channel/lb_policy/round_rob'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/json/common.rb:156:in `parse'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/specification/json.rb:61:in `from_json'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/specification.rb:748:in `from_string'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/specification.rb:722:in `from_file'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/source.rb:188:in `specification'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/specification/set.rb:58:in `block in specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/specification/set.rb:56:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/specification/set.rb:56:in `specification_name'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/cdn_source.rb:216:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/source/aggregate.rb:83:in `block in search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/source/aggregate.rb:83:in `select'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.11.0.beta.2/lib/cocoapods-core/source/aggregate.rb:83:in `search'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:416:in `create_set_from_sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:385:in `find_cached_set'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:360:in `specifications_for_dependency'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:165:in `search_for'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:267:in `each'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:267:in `sort_by'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:267:in `sort_by!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:267:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:60:in `block in sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:77:in `with_no_such_dependency_error_handling'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/delegates/specification_provider.rb:59:in `sort_dependencies'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:754:in `push_state_for_requirements'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:744:in `require_nested_dependencies_for'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:727:in `activate_new_spec'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:684:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.0.beta.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'


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

[!] Oh no, an error occurred.

but when i delete Firebase plug-in

  firebase_auth: ^3.0.1
  firebase_core: ^1.4.0
  firebase_storage: ^10.0.1
  cloud_firestore: ^2.4.0
  firebase_messaging: ^10.0.4
  admob_flutter: ^1.0.1

pod install fine :(

how can i solve this issue ?

i try everything in web but its didn't work :(

flutter doctor its all good :)

2 Answers 2

0

found here: How do I resolve the pod install error on flutter?

Cocoa Pods Installation in M1

sudo gem install cocoapods
sudo gem install ffi
arch -x86_64 sudo gem install cocoapods -n /usr/local/bin
sudo gem install cocoapods -n /usr/local/bin

Install ffi

sudo arch -x86_64 gem install ffi

#update repo

arch -x86_64 pod install --repo-update

Flutter iOS builds

flutter clean
flutter build ios

Re-install dependency in iOS folder of flutter project

arch -x86_64 pod install
Sign up to request clarification or add additional context in comments.

Comments

0

Some times error occur with android terminal. Use normal terminal

pod clean

pod install

Comments

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.