0

when I try to run pod init in Catalina I get the following error:

name@name-MacBook-Pro Lab8-Firebase % pod init 
WARNING: An illegal reflective access operation has occurred 
WARNING: Illegal reflective access by org.jruby.util.SecurityHelper to 
field java.lang.reflect.Field.modifiers 
WARNING: Please consider reporting this to the maintainers of 
org.jruby.util.SecurityHelper WARNING: Use
--illegal-access=warn to enable warnings of further illegal reflective 
access operations 
WARNING: All illegal access operations will be denied in a future 
release git version 2.29.2 
RuntimeError: Failed to extract git version from `git --version` ("")
                  git_version at /Users/name/.rvm/rubies/jruby- 
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods- 
1.10.0/lib/cocoapods/command.rb:128 verify_minimum_git_version! at 
/Users/name/.rvm/rubies/jruby- 
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods- 
1.10.0/lib/cocoapods/command.rb:140
                          run at /Users/name/.rvm/rubies/jruby- 
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods- 
1.10.0/lib/cocoapods/command.rb:49
                       <main> at /Users/name/.rvm/rubies/jruby- 
9.2.5.0/lib/ruby/gems/shared/gems/cocoapods-1.10.0/bin/pod:55
                         load at org/jruby/RubyKernel.java:1007
                       (root) at /Users/name/.rvm/rubies/jruby- 
9.2.5.0/bin/pod:1
                         eval at org/jruby/RubyKernel.java:1046
                       <main> at /Users/name/.rvm/gems/jruby- 
 9.2.5.0/bin/jruby_executable_hooks:24

I have tried doing the following:

  • updating the git version
  • updating ruby
  • reinstalling cocoapods
  • reinstalling homebrew
  • sudo xcode-select --install (from this SO post).

Any help would be appreciated - thanks.

1 Answers1

1

Check you pod minimum deployment target, it should be 13.0 or higher.

enter image description here

The other issue that might be can be resolved like this: Go to Xcode Preferences then select Location tab and change your Xcode Version at Command Line Tools to your current Xcode version that you are using.

enter image description here

Fisfej
  • 84
  • 5
  • thanks for your response! I just checked your second suggestion, which is already set in my project. The "Command Line Tools" are set to the right version that I'm using (12.0). However, I don't have a Podfile... that is what I'm trying to create with `Pod Init` and is causing the error -- so I assume the first suggestion doesn't apply? –  Nov 14 '20 at 23:59