AirBnB’s iPhone app has a gigantic code base (1.5 million lines of first-party code), a giant mobile team (75 iOS engineers), and a long history (first commit: 2010).
Over time, their app got so big and complex that the project began to take minutes to open (not build) in Xcode. Developers had to use the USB port on the right side of their MacBooks to avoid thermal throttling. 🤦🏻♂️
Given all this sheer complexity, the team there made some clever adjustments to develop, test, and ship their app pretty efficiently. Check it out.
And yet we all do it because it also has its benefits. 🤦🏻♂️😂
That article is a realistic and practical look how the dependencies affect your app in terms of app launch times, app size, and build times. It compares Swift Package Manager 🤓, Carthage 🤷🏻♂️, CocoaPods 😬, manual dependency management 🥺, and Git Submodules 🤮.
I still have a dream of zero dependencies 🤩, but I know it’s not realistic in a complex app. 😑
Developing features for a large, established app, I often run get slowed down trying to throw together a new screen. You have to find the right spot in the code to update, build the whole app (not just what you changed), log in, and drill down to the right spot to try out your creation. Something’s off? Do it all over again.
Which is why I love the idea of the Playbook library, which is “a library that provides a sandbox for building UI components without having to worry about application-specific dependencies.” Yass! 🤟
I keep feeling frustrated by the added complexity and extra code involved in dependency injection. It can make simple code complex very quickly. So I really love the idea here, which is that Xcode is perfect for DI because it lets you literally just wire up things visually with no extra code. It goes on to make the case for using Interface Builder to wire up more than just UI elements and use it for just about anything.
What’s great about it is that it doesn’t just generate a bunch of code, but instead “freeze dries” real objects to be instantiated when the program loads.
This article is so old that the images don’t load, but I love the ideas and the reminder that DI does not have to involve a bunch of extra code. Thanks to iOS Dev Weekly for the initial link. 👆