Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between pod 'FirebaseAnalytics' and pod 'Firebase/Analytics' in CocoaPods?

I recently came across two different ways of specifying Firebase Analytics(or other Firebase products) in a CocoaPods Podfile:

pod 'FirebaseAnalytics'

pod 'Firebase/Analytics'

I found information suggesting that the second one is a subspec, while the first is a standalone pod. However, I'm not entirely clear on how CocoaPods works. Can someone explain if there is a difference between these two syntaxes, and if so, what is it?

Additionally, I noticed that when using them, they seem to pull different dependencies. Could someone elaborate on the differences in dependencies that these two syntaxes might introduce?

Thanks in advance!

like image 208
Alisher Baigazin Avatar asked May 15 '26 15:05

Alisher Baigazin


1 Answers

'Firebase/Analytics' is an alias, it doesn't contain any own sources and actually depends on FirebaseAnalytics.

If you look at their respective Podspecs (1, 2) you'll notice that Firebase/Analytics depends on Firebase/Core, which in return depends on FirebaseAnalytics.

But there's a trick - both pods are updated separately. For example, if you install Firebase/Analytics at the time of writing (01/16/24) you'll have version 10.19.0 installed, but if you use FirebaseAnalytics instead you'll have 10.20.0. And my guess is FirebaseAnalytics is updated faster in general, since Firebase/Analytics is a subspec and only gets updates once all of its subspecs' dependencies get their updates.

like image 182
badew Avatar answered May 17 '26 08:05

badew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!