Why do I need 34 dependencies just to add Google Sign in to my iOS app?

Update: Google has deprecated the old structure and has changed Google/SignIn to a separate GoogleSignIn that seems to highly reduce the amount of dependencies. Yay! 🎉

Disclaimer: This is a bit of a random rant piece. And an opinionated one at that :)

After a discussion I’ve had yesterday with a few iOS buddies in an iOS Devs Slack group, I was surprised to discover what I like to call a MAD Graph (Massive Dependency Graph) for the Google Signin SDK.

Let’s say we want to simply add the option for users to Sign in to our app using their Google Account.

We’re good developer citizens, so we went to the Official Google Documentation, where we were instructed to put in the following dependency in our Podfile:

This seems rather innocent, up until when you type pod install and look into your Podfile.lock file:

34 Dependencies for a single Cocoapod ¯\_(ツ)_/¯

Our app was just introduced with 34 different dependencies (that add up to about 28MB of dependency code), including Google Toolbox for Mac, Firebase Analytics, Firebase Core and more, all for a rather simplistic task of displaying a Sign In sheet and authenticating the user. I would assume the average app needs (including our own) will never have any other interaction with this SDK besides that.

I’ve discussed with a couple of friends of mine from Google on different teams who themselves were surprised of this quite mammoth-y dependency tree.

The reality of things is that, if this wasn’t something as unique as Google Sign In, the average developer would give up on using this library due to its complex dependency tree.