Error Installing 'pod Firebase/Firestore' in my iOS app

喜欢而已 提交于 2021-01-29 06:25:08

问题


I am unable to install pod Firebase/Firestore. I am also unable to locate the error also, here is all the information:

Version information:

   CocoaPods : 1.10.0
        Ruby : ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
    RubyGems : 2.5.2.3
        Host : Mac OS X 10.14.6 (18G103)
       Xcode : 11.0 (11A420a)
         Git : git version 2.21.0 (Apple Git-122)
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib
Repositories : trunk - CDN - https://cdn.cocoapods.org/

My PodFile:

At the end of terminal it provides following information:

At the start of terminal, where I give "pod install" command:

Inside terminal, where the error occurred:

I had installed it a couple of times earlier, but this time it is giving this strange behaviour which I am unable to figure out. Any help would be highly appreciated. Thanks.

EDIT: @Jay

So at first I removed all cocoapods versions by 'sudo gem uninstall cocoapods' and then installed cocoapods again, here it is:

Then, I copied pods from a working project and created a new project and in the podfile pasted those pods, here:

Then after executing pod install, I got the same error, here:

I don't know why is this happening, and is driving me crazy to know that it is not an issue from firebase. I am unable to figure out exactly what is happening.


回答1:


Have you tried to add source in your podfile? Just an idea

platform :ios, '11.0'
...
source 'https://github.com/CocoaPods/Specs.git'
...



回答2:


That podfile looks a bit incomplete. It should be more like this - this is from a working project that includes Analytics, Auth and Firestore

project 'your_project_name.xcodeproj'

# Uncomment the next line to define a global platform for your project
platform :ios, '13.0'

target 'your_project_name' do
  use_frameworks!

  # Pods for iOS Firestore
  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore'
end

You should also update all your cocoapods

sudo gem install -n /usr/local/bin cocoapods

You may have conflicing characters in your podfile. As a quick test, try opening your podfile with Cocoapods.app. Don't install, just try to open it and see if there are any errors. Save it. Then try pod install on the command line.

Last thing, try deintegrating your existing podfile from the project.

pod deintegrate

and then

pod install

making sure you've quit Xcode before doing the above.




回答3:


Ok so after some struggle I got the solution to my problem. My pod repo was somewhat outdated and because of that I was unable to install the pod. The error in the terminal was reading something like 'Unexpected token by boringSSL...'

I performed the following commands to remove my pod repository and reinstalled it, after which the pod installed correctly:

pod repo remove master
pod setup
pod install


来源:https://stackoverflow.com/questions/64591137/error-installing-pod-firebase-firestore-in-my-ios-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!