Neria Jerafi
Neria Jerafi

Reputation: 35

How To Update Google Maps SDK iOS

I had been update Xcode , and while I'm running my app I'm getting this error message:

Main Thread Checker: UI API called on a background thread: -[UIApplication applicationState] PID: 14616, TID: 312485, Thread name: com.google.Maps.LabelingBehavior, Queue name: com.apple.root.default-qos.overcommit, QoS: 21

Searching online I found it's SDK bug of Google Map and I need to upgrade SDK Google Maps pod version, when I'm trying to upgrade the Google Maps SDK I got this message in terminal:

[!] Failed to connect to GitHub to update the CocoaPods/Specs specs repo - Please check if you are offline, or that GitHub is down

How to solve this problem?

Upvotes: 0

Views: 2505

Answers (3)

Vaiden
Vaiden

Reputation: 16132

To elaborate on @vahid's answer, what happened here is that your Specs repo has not been updated to the latest version.

A Spec is a version descriptor for a specific Pod. Your cocoapods installation maintains a local copy of the Specs repo to relieve some workload off GitHub's servers.

Very old versions of cocoapods used to refresh the local Specs repo every pod install. Nowadays you need to specifically tell it to fetch the latest version.

@vahid's answer, while correct, is a bit unsafe and time-consuming for my taste.

The official docs suggest this method for manually fetching the latest Specs repo:

pod repo update

This switch forces the previous command to run automatically prior to the Pod installation:

pod install --repo-update

Upvotes: 0

Vahid
Vahid

Reputation: 3496

You have to refresh cocoapod repo.

$sudo rm -fr ~/.cocoapods/repos/master
$pod setup

Cocoapod Setup may take some times to done.

$pod install

Upvotes: 2

dahiya_boy
dahiya_boy

Reputation: 9503

Actually i also get same when I updated my system and xcode.

I found that when system is update my cocoapods are automatically removed from the system, so i tried sudo gem install cocoapods which installed the cocoapod again in my system. Then I used pod install to update my pods.

Upvotes: 1

Related Questions