AsyncImage gets a significant upgrade in iOS 27. Images can now be cached automatically, and a new URLRequest-based initializer gives you much more control over how those images are fetched and cached.
In this SwiftUI tutorial, we’ll start by comparing the behaviour of AsyncImage on iOS 26 and iOS 27 using a deliberately throttled network connection. You’ll see that simply running the existing app on iOS 27 gives us image caching without changing any code.
Then we’ll take things further by creating our own dedicated URLCache and URLSession for AsyncImage. We’ll monitor the cache as images are downloaded, inspect the cached files on disk, add the ability to clear the cache, and display its current storage usage in the app.
Finally, we’ll switch AsyncImage from a URL to the new URLRequest initializer and explore the different cache policies available in iOS 27. We’ll test how cache-only, reload, cache-first, and the default HTTP caching rules behave so you can choose the right approach for your own SwiftUI apps.
If you’re using AsyncImage in an iOS 27, iPadOS 27, or macOS 27 app, these changes are well worth understanding.
Are you tired of Ruby and Fastlane installation issues? There's got to be a better way! Discover Codemagic open source CLI tools. It is not a drop-in replacement for all of what Fastlane does (screenshots for example), but we use it at Codemagic to build and publish iOS and Android apps, also versioning and device provisioning.