{"repo":"superwall/iOS-Backports","free":true,"listed":false,"github":"https://github.com/superwall/iOS-Backports","clone":"git clone https://github.com/superwall/iOS-Backports.git","description":"SwiftUI-Backports makes it easy to use the latest SwiftUI modifier, like those introduced in iOS 26, while still supporting older iOS versions. With a simple .backport modifier, you can write modern SwiftUI code without wrapping every new API in #available checks. It’s lightweight, drop-in ready, and keeps your UI code clean and future-proof.","language":"Swift","stars":407,"topics":["backports","ios","ios18","ios26","swift","swiftui"],"license":null,"category":"mobile-apps","readme_excerpt":"SwiftUI-Backports ✨ A lightweight way to use the latest SwiftUI modifier APIs while gracefully supporting older iOS versions. Solving the N-1 Problem Every fall, a new version of iOS ships with shiny new SwiftUI APIs. However, a lot of apps will continue to support the last version of iOS (i.e., N-1). That often leads to code that looks like this: Multiply that across your entire codebase, and suddenly you’re tangled in #available checks and duplicated code. The Solution This project offers a simple Backport type that lets you use new SwiftUI APIs with a fallback — without cluttering your UI code . - ✅ Write modern SwiftUI code that reads cleanly - ✅ Seamlessly backport newer iOS modifiers to earlier versions - ✅ No more nested if #available blocks - ✅ Just one Swift file — easy to drop in and maintain It’s based on Dave DeLong’s elegant approach to backwards compatibility in Swift. Definitely read that before diving in. Example Instead of writing: You can write: And the Backport type handles the fallback internally. As such, it removes all the #available clutter from your call sites and centralize the fallback, while still using runtime availability branching under the hood. Here, the left side is using a thin material, while the right uses a glass effect on iOS 26 and above: Installation Swift Package Manager (Recommended) You can add this repo as a dependency in Xcode: 1. Open your project. 2. Go to File Add Packages… 3. Enter the URL: https://github.com/superwall/iOS-Back","default_branch":null,"files":null,"tree":[],"storefront":"/r/superwall","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/superwall/iOS-Backports/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}