Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which Google analytics cocoapods pod to use

From the official documentation Google suggest to use the submodule from the Google pod

pod 'Google/Analytics'

But if you search on cocoapods.org there is separate pod maintained by Google as well, called GoogleAnalytics

As of this writing, in the official documentation they also have a note, which make things more confusing:

Note: Beginning with version 3.16 of the Google Analytics for iOS SDK, Xcode 7.3 or higher is required.

Current version of Google pod is 3.0.3

Current version of GoogleAnalytics pod is 3.16.0

From the .podspec of Google we can see that it has as dependency 'GoogleAnalytics' but also 'FirebaseAnalytics'

  1. Is GoogleAnalytics not intended for direct use (like GoogleUtilities)?
  2. Why Google pod (version 3.0.3) is using 'FirebaseAnalytics' pod and how does this affect the Google Analytics dashboard?
like image 731
Daniel Avatar asked Aug 31 '16 08:08

Daniel


People also ask

Where do you put pods in Podfile?

Run open Podfile. Which opens the Podfile in textEdit. Add pod'CorePlot', '~> 1.4' to it and save. Run pod install -- NOTE* that is **pod update if already installed.

What is Podspec in CocoaPods?

A Podspec, or Spec, describes a version of a Pod library. One Pod, over the course of time, will have many Specs. It includes details about where the source should be fetched from, what files to use, the build settings to apply, and other general metadata such as its name, version, and description.

Why do CocoaPods use Ruby?

Ruby was a good choice to let users monkey-patch whatever they needed for their projects. Ruby is an excellent language for CLI tools that do a lot of string manipulation. They made an effort to make sure @CocoaPods would work with the Ruby that shipped with OS X, even when not having the Xcode CLI Tools installed.


1 Answers

the Google/Analytics pod is the one that should be used when implementing Google Analytics in your iOS app. You are correct in that the GoogleAnalytics pod is not meant for direct use; we'll be updating the pod description.

like image 190
Tiem Song Avatar answered Sep 22 '22 22:09

Tiem Song