Posts in: iosdev

2025

I have been calling and treating AI/LLM tools as bullshit generators. It helps to test your own assumptions from time to time, head-first.

2024

Solving backward-compatibility issues in Swift 6 language mode.

I recently had to tackle uploading somewhat larger files from an iOS app to a backend service. It’s not a type of functionality that’s often needed thus every time I have to do it I end up re-discovering some gotchas. Best way to remember is to write it down hence this blog post.

Core Data is often dunked on for its performance, especially involving large quantities of objects. Let’s dig into this.

Unstucking SPM resolver graph.

There is no silver bullet when it comes to importing large sets of data into a complex Core Data graph. But it's not impossible to do. This is common sense approach that worked very well in my apps, for several years now.

2023

Explanation of the serious bug in sections order when sectionNameKeyPath is not the first item in the FRC’ sortDescriptors.

If your Swift struct supports Codable, you can save and restore it through Core Data persistance layer.

How to recognize links and other stuff (normally available only on UITextView) and make them interact-able.

2022

A look into the intricate details of Core Data NSFetchedResultsController’s new delegate method to work with diffable data sources driving a collection view.

Swift’s OptionSet is great type. Here’s how you save and read such values in Core Data.

Recommended way to seamlessly gel UITabBarController with Coordinator pattern, where each tab has its own Coordinator.

2021

Old-school way of handling async tasks using Operation

2020

KVO is often an example of something you should not use if you want to avoid crashes. But what if you need to use it?

First let’s see how it was done before iOS 13. Then we’ll take a look how scenes changed this setup. Spoiler: quite a bit.

Recent versions of Xcode and Interface Builder are great visual tools to build auto layout UIs.

It’s a funny title, eh? Born out of half-a-day of head-scratching.

2019

It’s not yet another networking library.

Interface Builder is an amazing tool, which allows you to declaratively build your UI. Same as SwiftUI — so why all the hate and ridicule over the years instead of unconditional love?

Transcript of my talk from PragmaConf 2019, presented on Oct 11th in Bologna.

First step in building a form on iOS, which is going to be used inside a collection view is to make up your mind on the design. Second step, implement the design of the cell. Third step – create an appropriate model object for the given cell.

It’s dead heat what’s more annoying: for customers to input data or for developers to validate and accept that input. It simply can’t be escaped in some cases.

I am trying to wrap my head around essential SwiftUI concepts. This is where I am today. Something I wrote here may be wrong but that’s ok, it’s a learning process. Do tell me if I’m wrong on anything here.

One small trick to make creation of self-sizing layouts easier.

UIViewController containment APIs are very old by now. They can still cause headache if you don’t pay attention to view loading process.

A lot of grief would’ve been saved if particular support/guidance article was published before scaring 10000s of developers.

Learn how to get the main benefit of my Coordinator implementation without actually using the library or the pattern.

2018

I am having so much benefit from using this pattern in last few years, I can’t help myself. I have to try and persuade all of you to use it too.

iOS 11 Music app features a lovely sliding cards UI for stuff that modally pop over the existing content. Here's how to replicate it in your app.

Sorry Doug.

Command-line scripts to smartly download WWDC, Tech Talks and other videos from Apple's developer portal

How to implement true, tell-when-download-finishes Operation subclass

reduce, used properly, can be lightning fast. Here's where it yielded 200x improvement over nested for-in loop.

I went thoroughly through the great new book by objc.io authors. Given its topic, you can expect I have lots to say.

Core Data is large and powerful framework. Learn how to use it properly and efficiently in iOS app of any complexity.

Replicating UITabBarController behavior using Coordinators flattens your UI hierarchy and thus considerably simplifies controller transitions

Even with Codable available in Swift 4, I still prefer using Marshal library. Here’s how to extend it to properly handle JSON representations of Date

A bug in Apple’s code that appears only in 10.3 and only on device

2017

I have an opinion. Yes, I know that joke.

I hope I got it wrong here, I really do. Because it’s driving me bananas how convoluted this API is.

I dislike these ‘one-really-weird-trick...’ titles but this one is really useful in so many cases. Understand it and apply it diligently.

Expanded transcript from my talk at NSSpain 2017

One more step on the path to hide Core Data‘s Objective-C details

“Avoid notification.object and userInfo”

Let the language work for you

Chasing compiler‘s own tail

Taking the first step towards clean and minimal app architecture in iOS app means freeing your view controllers from the burden of dealing with other controllers.

Long live the swizzle!

2016

puttin’ the grumpy hat on, full Crusty mode

2015

2014

2013

2012

2011

2010

2009