Posts in: swift

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.

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.

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?

2019

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.

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.

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

2017

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

Voodoo called @NSManaged is not always your friend

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