Software Dev

What Adding Dependencies Will Do To Your App in 2020

I like the title of this article because it recognizes that pulling third-party dependencies into your app has a cost.

๐Ÿ‘‰ What Adding Dependencies Will Do To Your App in 2020

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. ๐Ÿ˜‘

Via iOS Dev Weekly.

Software Dev

We All Hate Error Handling. Here Are Some Tips.

Error handling makes everything more complicated. Ugh! What do you do if a network call times out (pretty common)? Or you’re trying to save an image and there is no disk space (less common but can happen)? Or that thing that’s never supposed to happen happens (occasionally happens)?

I mean, you have to do something, right? Ugh. ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ

Here are some tips. Thanks to Swift By Sundell for giving this topic some attention.

๐Ÿ‘‰ Propagating user-facing errors in Swift

Via iOS Dev Weekly.

Software Dev

Uber’s Piranha Eats Your Stale Code

Feature flags are a great way to selectively introduce new features. it allows you to experiment and commit incrementally.

The only down-side to feature flags all the extra code, and in particular going back later together rid of all the crusty flag code flagging you feature on or off. This kind of tech debt can really pile up over time.

Apparently Uber uses feature flags in the thousands and without remorse. So they came up with this automatic way to wipe out your stale, disabled code. Perfect name, too!

๐Ÿ‘‰ Introducing Piranha: An Open Source Tool to Automatically Delete Stale Code | on GitHub

Via iOS Dev Weekly. See also: The Mother of All Feature Flagging Systems for iOS

Software Dev

Point-Free Composable Architecture

A new software architecture! Hurray! ๐Ÿ™Œ๐Ÿคท๐Ÿปโ€โ™‚๏ธ

I’m filing this away as an idea to try on my next app because all other architectures are still just annoying in some way, and this one has a good name. ๐Ÿ˜†

This architecture is designed to work with SwiftUI and UIKit on any Apple platform (iOS, macOS, tvOS, and watchOS).

๐Ÿ‘‰Composable Architecture, the library

Via iOS Dev Weekly.

Software Dev

Scroll Views in Interface Builder

There are a couple of tricks to getting your scroll view working in an Xcode storyboard. The great fluffy.es blog carefully walks you through it. ๐Ÿ‘

๐Ÿ‘‰ How to use scroll view in Interface Builder / Storyboard (Xcode 11)

This site also has some really helpful notes on intrinsic size. And a great series on Making Sense of Auto Layout. Who knew? This guy is good. He’s giving Ray Wenderlich a run for his money. ๐Ÿ˜ฒ

constraint explanation
Software Dev

Using Protocols to Remove the Network Layer from Your iOS App

Most of us developers know can we can should abstract the network layer to support mocking, unit testing, and just to produce a more flexible design.

While lots of us know this, in practice it seems to get overly complicated and not always done well. A good design should simplify things, not complicate things. This is why I like this post focusing on using protocols to simplify network requests and improve testability. It even gets into decoding responses to give you a useful end-to-end flow.

๐Ÿ‘‰ Removing the network layer in your iOS app

Even better, this is part of a Power of Protocols series (yay!).