Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Analytics Pod installs too many dependencies

I've just included the Google Analytics Pod as described in their iOS developer guide with:

pod 'Google/Analytics'

When running

pod install

it installs the following dependencies:

Installing FirebaseAnalytics (3.2.0)
Installing FirebaseInstanceID (1.0.6)
Installing Google (3.0.3)
Installing GoogleAnalytics (3.14.0)
Installing GoogleInterchangeUtilities (1.2.1)
Installing GoogleSymbolUtilities (1.1.1)
Installing GoogleUtilities (1.3.1)

Since I don't use Firebase, I would like to get rid of the FirebaseAnalytics and FirebaseInstanceID (as well as all pods that are not needed by the framework itself).

Installing unused dependencies only bloats up my app size. I would like to only install the absolute minimum amount of pods to get GoogleAnalytics running.

Any ideas on how to kick the unused Pods out?

like image 639
productioncoder Avatar asked May 30 '16 15:05

productioncoder


1 Answers

As seen in this answer, you can use:

pod 'GoogleAnalytics'

…to avoid installing the dependencies. Note that you'll need to change your Objective-C imports in your bridging header file; I needed at least:

#import <GoogleAnalytics/GAI.h>
#import <GoogleAnalytics/GAIFields.h>
#import <GoogleAnalytics/GAIDictionaryBuilder.h>
like image 193
Robert Avatar answered Sep 30 '22 21:09

Robert