-1

I'm not sure how, but I managed to install version 1.8.4 of cocoapods. However, I can't update it. I need to update it because the pods for the firebase google sign in require FirebaseAnalytics, and Firebase Analytics requires cocoapods to be 1.10.0. Whenever I try to update it, either by simply sudo gem install cocoapods or sudo gem update cocoapods, I get the following error:

The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first.

This is odd because I do in fact have xcode developer tools installed.

enter image description here

And here are the pods (one of which requires FirebaseAnalytics)

enter image description here

Also see the error message:

enter image description here

This question is similar to several others--I'm asking a new question because the answers to those questions didn't help me and the questions were fairly old, so I doubt I'll get any help there.

I greatly appreciate your help. This problem alone is stopping me from using Firebase's google sign in in my application.

EDIT: After I re-installed cocoapods with brew I checked my pod version, only to find that it was still 1.8.4. I then ran brew upgrade cocoapods and everything seemingly looked up to date. But I checked the version once more and am still seeing 1.8.4. What is going on here?

enter image description here

EDIT 2: bundle result

I was able to successfully (seemingly) install bundle, but I'm getting errors when I try to use bundle to install / update cocoapods.

enter image description here

EDIT 3: Solution Found?

I tried upgrading cocoapods again with brew, and for some reason it worked this time--even though last time I tried upgrading cocoapods with brew it didn't work. (Did bundle help?) I still have yet to see if this solves my original problem, but cocoapods is now version 1.11.2, the newest version. Thanks for all the help!

enter image description here

10
  • 1
    FirebaseAuth does not require FirebaseAnalytics. Commented Nov 7, 2021 at 5:18
  • You may be right, but certainly one of the pods I need for google sign in with firebase does. See my clarified question. Commented Nov 7, 2021 at 5:51
  • 1
    Firebase/Core is deprecated and just a synonym for Firebase/Analytics Commented Nov 7, 2021 at 15:45
  • If I change Firebase/Core to Firebase/Analytics will that fix my problem? Commented Nov 7, 2021 at 16:21
  • 1
    WIth brew, I'd check stackoverflow.com/questions/3987683/… to install correct version. There is the brew switch for instance if you checked correctly the version. Your issue is there I think... Because I think that the 1.11.2_1 is installed, but it's not the one "linked"... See also stackoverflow.com/questions/13477363/… Commented Nov 14, 2021 at 17:13

1 Answer 1

-2

Updated answer.

  • Install cocapods with brew.

I was facing same issue that installed latest version cocapods with brew but when try to check in terminal my machine always linking old version cocapods so here using bellow commands resolve my issue.

Override brew pods to another pods

brew link --overwrite cocoapods 
Sign up to request clarification or add additional context in comments.

7 Comments

I tried that command. Didn’t work.
For the google sign in, I do believe that I need to use cocoapods--I couldn't find it on SPM and it specifically says to use cocoapods. The stack overflow question you linked to is related to my problem, but didn't address my issue. The answers have to do with the firebase version, but I need to update cocoapods.
No the point is that I already tried updating cocoapods--that's exactly the error I'm having. I tried sudo gem install cocoapods and sudo gem update cocoapods and both gave the error I described above. Is there another way of updating cocoapods that you suggest?
|

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.