Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Carthage and GoogleMap

Is it possible to install GoogleMap SDK via Carthage?

I only saw the tutorial for Cocoapods only.

Or I only can install manually if I am using Carthage?

like image 834
Alex Chan Avatar asked Aug 22 '16 06:08

Alex Chan


People also ask

When was Googlemaps invented?

1. Google Maps is born. On Feb 8, 2005, Google Maps was first launched for desktop as a new solution to help people “get from point A to point B.” Today, Google Maps is used by more than 1 billion people all over the world every month.

What is the vision of Google Maps?

Explore and navigate your world.


2 Answers

According to Carthage docs:

The only supported origins right now are GitHub repositories (both GitHub.com and GitHub Enterprise)

Carthage actually builds binary framework from the sources it checkouts from the specified repository. Developer needs to link this built binary frameworks to the project afterwards.

Google already provides you with the binary version of GoogleMaps framework instead of sharing sources. Therefore all you have to do is just download this binary from official website and link it to your project without using Carthage. So you can say that Google has already done Carthage work for you so you don't have to use Carthage to build GoogleMap framework. And I believe you even couldn't if you want to because GoogleMaps source code is not open.

Hope my answer will be helpful for you.

like image 79
iyuna Avatar answered Sep 22 '22 11:09

iyuna


Carthage supports linking directly to binary assets. If you go to the "Manual Integration" section in the documentation page, you'll notice the download link looks something like this:

https://dl.google.com/dl/cpdc/d308af63f78a5a1a/GoogleMaps-3.1.0.tar.gz

So all you have to do is create a local JSON file called something like GoogleMaps.json, and put the following in it:

{
  "3.1.0" : "https://dl.google.com/dl/cpdc/d308af63f78a5a1a/GoogleMaps-3.1.0.tar.gz"
}

Then, in your Cartfile, add:

binary "GoogleMaps.json" ~> 3.1.0

Voila!

like image 29
Shai Mishali Avatar answered Sep 19 '22 11:09

Shai Mishali