0
votes

I have installed Google tag manager through Cocoapods using "pod 'GoogleTagManager', '~> 5.0'". This has dependencies like "GoogleAnalytics (3.17.0)" and "GoogleUtilities (1.3.2)".

There is GoogleAnalytics library already included in my project and Can't delete this library due to some problems. So what i want to do is either

  1. Exclude this dependency (GoogleAnalytics) while "pod install"

or

  1. Remove this dependency after "pod install"

whichever is possible.

I found this link, but I am not aware of custom, local podspec file. Any help in this regard is much appreciable. Thank you.

1
Removing the line pod GoogleAnalytics and pod install should do the job normally if it is removing the dependency. But, you are saying "can't delete this library". - KrishnaCA
I am using "pod 'GoogleTagManager', '~> 5.0'" to install Google tag manager. There is no "pod GoogleAnalytics" line in my Podfile. - Dev

1 Answers

0
votes

GoogleTagManager has the following dependencies.

  1. GoogleAnalytics
  2. FirebaseAnalytics
  3. GoogleUtilities

If you have any one of these libraries already included in your PodFile, then you can remove these if they are the cause of any compiler errors.

The link is for creating your own PodSpec. I believe that we can't really exclude dependencies from some other library's pod.