Release Note · Swift Toolkit Version 4.0.0-alpha.1
We are happy to announce the first alpha of the Readium Swift Toolkit 4.0.0, a major version focused on Swift 6 and strict concurrency. This release also brings richer accessibility metadata to the Content API, a reworked LCP authentication flow, and a leaner set of packages.
Browse the full release on GitHub
This is an alpha: the API may still shift before 4.0.0 is final. Please try it out and let us know what breaks or feels awkward, either on GitHub or on the Readium Discord. Your feedback is what will shape the stable release.
A huge thank you to Steven Zeck and Grigor Hakobyan, who spearheaded the Swift 6 migration. This was a long, meticulous effort across every package of the toolkit, and it would not have landed without them.
The toolkit is now a Swift 6 library
Every package now compiles in the Swift 6 language mode with strict concurrency checking. Publications and their resources can be passed freely between tasks, and navigators are formally tied to the main thread.
You do not have to migrate your own app to Swift 6 to use this release, and can adopt strict concurrency at your own pace.
Better descriptions for images and media
Authors describe images, charts and media in many different ways, and the toolkit now gathers all of them for you. Each content element carries, when the author provided one, an accessible name, description and an extended description. We follow the W3C accessible name computation and the DAISY best practices for extended descriptions in EPUB.
Text-to-speech benefits directly: audio and video elements now carry accessibility information, so the TTS can announce them instead of passing over them in silence.
A simpler LCP passphrase UIKit dialog
Asking a reader for their LCP passphrase no longer requires handing the toolkit a view controller to present from. The toolkit tells you when a passphrase is needed and your app decides where and how to show the dialog.
The LCP service also asks you for a device name up front instead of deriving one. This is the name readers see when managing the devices registered to their license.
Breaking changes and a leaner toolkit
Three packages are gone: the two adapters deprecated during the 3.x series — the embedded HTTP server and the SQLite storage for LCP, both replaced by built-in alternatives — and an internal utility package that was never part of the public API.
Alongside the Swift 6 changes, these are the updates most likely to require work when you upgrade. The migration guide covers each one with before and after examples
