Firebase- Error with 'pod Firebase/Analytics'

Hi, I’m new to the whole coding scene and I want to get Firebase on my xcode. I followed everything the setup manual said and was working until i reached the part where i have to add the Firebase SDK with CocoaPods. I opened the terminal directed to the folder where my xcode project is, typed pod init, got the podfile txt, opened it and wrote the command "pod ‘Firebase/Analytics’ " (as instructed form the firebase manual). I saved it and ran pod install and it keeps giving me the same error:

Analyzing dependencies

xcode-select: error: tool ‘xcodebuild’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance

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

Command


/usr/local/bin/pod install

Report

  • What did you do?

  • What did you expect to happen?

  • What happened instead?

Stack


   CocoaPods : 1.10.0

        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

    RubyGems : 3.0.3

        Host : Mac OS X 10.15.3 (19D76)

       Xcode :  ()

         Git : git version 2.24.3 (Apple Git-128)

Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib

Repositories : trunk - CDN - <LINK>

Plugins


cocoapods-deintegrate : 1.0.4

cocoapods-plugins     : 1.0.0

cocoapods-search      : 1.0.0

cocoapods-trunk       : 1.5.0

cocoapods-try         : 1.2.0

Podfile


# Uncomment the next line to define a global platform for your project

# platform :ios, '9.0'

target 'Meet Friends or More' do

  # Comment the next line if you don't want to use dynamic frameworks

  use_frameworks!

  # Pods for Meet Friends or More

  pod 'Firebase/Analytics'

end

Error


JSON::ParserError - 416: unexpected token at '{

      "dependencies": {

        "Firebase/CoreOnly": [

        ],

        "FirebaseAuth": "5.0.2"

      },

      "name": "Auth"'

/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.10.0/lib/cocoapods-core/specification/json.rb:61:in `from_json'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification.rb:742:in `from_string'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/specification.rb:716:in `from_file'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-core-1.10.0/lib/cocoapods-core/source.rb:186:in `specification'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver/lazy_specification.rb:37:in `specification'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver/lazy_specification.rb:29:in `subspec_by_name'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:362:in `block in specifications_for_dependency'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:362:in `map'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:362:in `specifications_for_dependency'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:165:in `search_for'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:274:in `block in sort_dependencies'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:267:in `each'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:267:in `sort_by'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:267:in `sort_dependencies'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:53:in `block in sort_dependencies'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:70:in `with_no_such_dependency_error_handling'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/delegates/specification_provider.rb:52:in `sort_dependencies'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:288:in `initial_state'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:210:in `start_resolution'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolution.rb:168:in `resolve'

/Library/Ruby/Gems/2.6.0/gems/molinillo-0.6.6/lib/molinillo/resolver.rb:43:in `resolve'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/resolver.rb:94:in `resolve'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1074:in `block in resolve_dependencies'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:1072:in `resolve_dependencies'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer/analyzer.rb:124:in `analyze'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:414:in `analyze'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:239:in `block in resolve_dependencies'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/user_interface.rb:64:in `section'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:238:in `resolve_dependencies'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/lib/cocoapods/installer.rb:160:in `install!'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/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.10.0/lib/cocoapods/command.rb:52:in `run'

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.10.0/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.

Search for existing GitHub issues similar to yours:

If none exists, create a ticket, with the template displayed above, on:

Be sure to first read the contributing guide for details on how to properly submit a ticket:

Don’t forget to anonymize any private data!

Looking for related issues on cocoapods/cocoapods…

  • Could not the subspec load main source?

24 May 2013

  • Declare PODS_ROOT_NAME variable in the xcconfigs

01 Aug 2013

  • Git + pod install is slow

23 Sep 2014

and 10008 more at:

https://github.com/cocoapods/cocoapods/search?q=416%3A%20unexpected%20token%20at%20%27%7B%0A%20%20%20%20%20%20%22dependencies%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22Firebase%2FCoreOnly%22%3A%20%5B%0A%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22FirebaseAuth%22%3A%20%225.0.2%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22name%22%3A%20%22Auth%22%27&type=Issues&utf8=✓

[!] Automatically assigning platform iOS with version 13.7 on target Meet Friends or More because no platform was specified. Please specify a platform for this target in your Podfile. See
[<LINK>]
().

The parts where are writen means theres a link there but i had to remove it because im a new user and cant post more than 2 links.
I’m sorry if this is not the way to send the error, I’m new and can’t seem to find the answer anywhere.

can you check our cocoapods tutorial maybe it can help? https://codewithchris.com/cocoapods/

also don’t install only analytics… usually it comes with the other features like this

pod ‘Firebase/Database’
pod ‘Firebase/Storage’
pod ‘FirebaseUI/Auth’
pod ‘Firebase/Auth’
pod ‘FirebaseUI/Email’
pod ‘Firebase/Analytics’

I’ve already seen the tutorial but it still gives me the error. I tested another podand it worked with pod 'Google-Mobile-Ads-SDK' but thats not the pod that i want. I’m not sure what to do.