Supporting multiple iOS versions? Create convenience wrappers for newer APIs, then use @ available with deprecated and obsoleted parameters to let the compiler flag dead code when you bump your minimum version. A clean strategy for pruning technical debt.

🔗: https://swiftwithmajid.com/2026/05/19/deprecating-your-own-convenience-api/ by Majid Jabrayilov (@Mecid)

#Swift #iOSDev #CodeQuality

Deprecating your own convenience API

Almost after every major update of iOS, we got new APIs that we use on the most recent platform but can’t use on the previous one. Usually, I solve this kind of thing by introducing my own convenience code that runs new APIs on the available versions and my custom implementation or stubs on old platform versions.

Swift with Majid