Henry
Henry

Reputation: 3457

Problem getting latest version of Firebase Cocoapods

I have an iOS project that uses the Firebase SDK and I am getting a warning from the App Store that I cannot submit a project using the deprecating UIWebView that an older version of Firebase auth uses.

I know I need to update the Firebase Pod to the newest version as I can see in the Firebase release notes that this issue was fixed on build 6.8.0.

However when I do pod install with this section in my Podfile:

  pod 'Firebase/Analytics', '~> 6.8.0'
  pod 'Firebase/Auth', '~> 6.8.0'
  pod 'Firebase/Firestore', '~> 6.8.0'

I keep getting an error:

Error

JSON::ParserError - 751: unexpected token at ''

This pod works fine though:

  pod 'Firebase/Analytics'
  pod 'Firebase/Auth'
  pod 'Firebase/Firestore

What am I doing wrong?

UPDATE:

It turns out there was something in the 6.8.0 version of the Pod that breaks Cocoapods. I changed the line to:

pod 'Firebase/Auth','~> 6.12.0'

and it successfully installed the updated pod I needed without references to UIWebView.

Upvotes: 0

Views: 2281

Answers (2)

Apps Maven
Apps Maven

Reputation: 1420

First of all, if you are getting a problem by mentioning the version ahead of the pod names then. Please remove pod names from your pod file and run pod install once on the terminal, then again paste pod names without mentioning version number, now click on save button on pod file and run Pod install command on terminal. This will install the latest versions for the pods mentioned in the pod file.

If you want to update the same pods then you can do one more thing, you can right pod without version number and run command pod update. But remember one thing this command will update all the pods in your pod file if you have pods other than Firebase Pods.

In both of these cases you need to use pods as mentioned below:-

pod 'Firebase/Analytics'

pod 'Firebase/Auth'

pod 'Firebase/Firestore

Upvotes: 1

Paul Beusterien
Paul Beusterien

Reputation: 29582

rm -rf ~/.cocoapods/repo and try again.

This is probably https://github.com/CocoaPods/CocoaPods/issues/9672

Upvotes: 1

Related Questions