Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to exclude dependency in Cocoapods?

Firebase/Messaging have dependencies on:

Using Firebase
Using FirebaseAnalytics
Using FirebaseCore
Using FirebaseInstanceID
Using FirebaseMessaging
Using GoogleInterchangeUtilities
Using GoogleSymbolUtilities
Using GoogleToolboxForMac

I would like to know is it possible to exclude GoogleToolboxForMac? Problem is that I have one static library included that already use GoogleToolboxForMac without cocoapods.

So just want to know is it possible or not?

like image 445
Nikola Klipa Avatar asked Nov 17 '16 15:11

Nikola Klipa


1 Answers

A better solution to exclude dependency would be to use local pod spec file like this build on the top of original one.

pod 'Firebase/Messaging', :podspec => 'FirebaseMessaging.podspec.json'

:: e.g. usage :: 1) Visit > https://cocoapods.org/pods/FirebaseMessaging

2) Click on 'See Podspec' (You will be redirected to existing spec on github)

3) Download this file by clicking 'Raw' followed by 'Save File As'.

4) Place this file in same directory as podfile of your xcode project

5) Edit this file and remove dependency you are not interested in.

6) Thats all. Execute pod install or pod update whichever is more relevant to you and dependency won't be installed any more.

To be noted: If FirebaseMessaging pod is updated in future, you will have to keep your local pod file in sync by yourself.

like image 112
xySVerma Avatar answered Sep 19 '22 14:09

xySVerma