iOS


Apple, the EU, and the Cost You Don’t Normally Get to See

Sixteen years ago, in the early days of the App Store, we built an app called The Red Carpet. It let you follow the Oscar nominees, wrapped around an audacious hook: guess every winner correctly and win a million dollars. The contest was real. We’d secured a $1M policy from Lloyd’s of London, gotten bonded […]


Apple had lost the plot. Did they rediscover it?

Last year I sold almost all of an Apple position I’d spent fifteen years building. The decision had nothing to do with the stock price. I assumed it would keep climbing for a while, the way Intel kept climbing long after it stopped being the company that defined its industry. Great companies run on a […]


Architecture Is About Making Easy Things Harder

In iOS development, there’s always been a fight over Controllers. The path of least resistance, when you have a piece of new logic to add, is to just throw it in the Controller. Every Apple WWDC for years would pretend this is how you add this new API. Drop in three lines, ship it. The […]


Swift 5.5: Asynchronous Looping With Async/Await

In an earlier article, I introduced the Swift 5.5 async/await syntax that lies at the heart of Swift’s new structured concurrency. To do so, I demonstrated how to replace a common use case of Grand Central Dispatch (GCD) — switching from the main thread to a background thread and then back to the main thread […]


Swift 5.5: Replacing GCD With Async/Await

Multithreading! The mere word sends shivers up one’s spine. And if it doesn’t, it should. Main thread and background threads. Code that runs asynchronously. Code that can run simultaneously with other code. Code that can run simultaneously with itself. Code that can share data across threads — possibly with disastrous consequences. Concurrency. Multithreaded code is […]


Taking Control of Rotation Animations in iOS

We all love to have animation in our app’s interface. But sometimes writing even the simplest animation can be rather elusive. Rotation is a case in point. As you probably know, the way to rotate a view (or a layer) is to change its transform, applying a rotation transform to it. But certain rotations are […]


Little Swift Tricks: Boxing Multiple Types

Here’s a little Swift language trick I sometimes use — more often than you might suppose, actually. As I’m sure you know, Swift is very strict about the types of its objects. You have to declare clearly what type a reference is, and from then on, you have to stick to that. That’s one of […]


Night Thoughts on Testing iOS In-App Purchases

What’s the business model for an iOS app? If you aren’t just distributing an app as a freebie out of the goodness of your heart (several of my apps do work that way), and if you aren’t being paid directly by a client to create or maintain the app in the first place, and if […]