Releases: readium/swift-toolkit
3.4.0
Warning
Minor releases (a.B.c) of the Readium toolkit may now include minor breaking changes, such as dependency upgrades or small API modifications. Major version numbers are reserved for significant architectural changes.
Take a look at the migration guide
Changelog
Added
Navigator
- You can now access the
viewportproperty of anEPUBNavigatorViewControllerto obtain information about the visible portion of the publication, including the visible positions and reading order indices.
Deprecated
Shared
- The Presentation Hints properties are deprecated from the Readium Web Publication Manifest models. See the official documentation.
Changed
Streamer
- EPUB series added with Calibre now take precedence over the native EPUB ones in the
belongsToSeriesRWPM property.
Fixed
Streamer
- #639 Optimized the opening of really large LCP protected publications.
Navigator
- #70 Fixed restoring the reading progression with RTL EPUB.
- EPUB vertical text in scrolling mode:
- #556 Fixed reporting and restoring the reading progression.
- Added support for decorations (highlights).
- #635 Fixed overlapping FXL pages in landscape orientation.
Commits
- Adjust the SwiftUI LCP dialog by @mickael-menu in #611
- Add
EPUBNavigatorViewController'sviewportby @mickael-menu in #612 - Remove duplicated documentation: Navigator/Preferences by @TechWilk in #615
- Add resource_bundles back to ReadiumShared podspec by @TechWilk in #617
- Fix support for RTL and vertical text publications by @mickael-menu in #619
- Add the scroll progressions in the EPUB
viewportby @mickael-menu in #620 - Replace reading order indices with HREFs in the EPUB viewport by @mickael-menu in #624
- Make format sniffers initialization public by @grighakobian in #628
- Update audio publication manifest augmentor api by @grighakobian in #627
- Remove
selflink in RWP packages by @mickael-menu in #629 - Deprecate the Presentation Hints from the RWPM models by @mickael-menu in #631
- Fix overlapping FXL pages in landscape orientation by @mickael-menu in #637
- Optimize the opening of really large LCP publications by @mickael-menu in #640
- fix documentation from conformsTo to conforms(to:) by @hongorzulnemo in #642
- Change the precedence of EPUB series by @mickael-menu in #643
- 3.4.0 by @mickael-menu in #644
New Contributors
- @TechWilk made their first contribution in #615
- @hongorzulnemo made their first contribution in #642
Full Changelog: 3.3.0...3.4.0
3.3.0
Warning
Minor releases (a.B.c) of the Readium toolkit may now include minor breaking changes, such as dependency upgrades or small API modifications. Major version numbers are reserved for significant architectural changes.
Take a look at the migration guide
Changelog
Added
Shared
- Implementation of the W3C Accessibility Metadata Display Guide specification to facilitate displaying accessibility metadata to users. See the dedicated user guide.
- Support for starting from a progression in the HTML content iterator.
- New link
relsin thereadingOrderand EPUBlandmarksto mark:cover: the title pagecontents: the table of contentsstart: the first actual chapter
Navigator
- A new
InputObservingAPI has been added to enable more flexible gesture recognition and support for mouse pointers. See the dedicated user guide.
Streamer
- The EPUB 2
<guide>element is now parsed into the RWPMlandmarkssubcollection when no EPUB 3landmarksnavigation document is declared.
LCP
- A brand new LCP authentication dialog for SwiftUI applications. See the accompanying user guide.
Fixed
Navigator
- Fixed several issues with the EPUB navigator cursor and pointer events.
- Fixed the cursor shape on iPadOS when using a physical trackpad or mouse.
- Fixed multiple tap events broadcasted while running on macOS.
- #449 Fixed misaligned EPUB navigator when it does not span the full screen width.
Commits
- Align contributor and series parsing with the Kotlin toolkit by @qnga in #577
- Update README by @mickael-menu in #578
- W3C Accessibility Metadata Display Guide by @mickael-menu in #574
- Update the issue template by @mickael-menu in #580
- Allow blank issues by @mickael-menu in #585
- Adjust README features by @mickael-menu in #583
- Fix cursor shape on iPadOS with physical pointer by @mickael-menu in #586
- Fix multiple tap events broadcasted on macOS by @mickael-menu in #587
- Fix applying the EPUB background on initialization by @mickael-menu in #588
- New API to observe user input by @mickael-menu in #590
- Refactor the
DirectionalNavigationAdapterby @mickael-menu in #592 - Fix misaligned EPUB navigator by @mickael-menu in #593
- Clean up deprecated APIs by @mickael-menu in #594
- Fix memory leaks by @mickael-menu in #595
- Support for starting from a progression in the HTML content iterator by @mickael-menu in #597
- Remove TestFlight mention for the Test App by @mickael-menu in #599
- Prevent user selection to trigger pointer events by @mickael-menu in #600
- Add new
LinkRelationfor thereadingOrderand EPUBlandmarksby @mickael-menu in #602 - Parse EPUB 2 guide as EPUB 3 landmarks by @mickael-menu in #603
- Fix extracting the cover from the manifest by @mickael-menu in #605
- Add a SwiftUI LCP authentication dialog by @mickael-menu in #607
- 3.3.0 by @mickael-menu in #609
New Contributors
Full Changelog: 3.2.0...3.3.0
3.2.0
Take a look at the migration guide
Changelog
Added
Shared
- Support for W3C's Text & data mining Reservation Protocol in our metadata models.
- Support for accessibility exemption metadata, which allows content creators to identify publications that do not meet conformance requirements but fall under exemptions in a given juridiction.
- Support for EPUB Accessibility 1.1 conformance profiles.
LCP
- Support for streaming an LCP-protected publication from its License Document (LCPL). Take a look at the LCP guide for more information.
Changed
Shared
- The
absoluteURLandrelativeURLextensions onURLConvertiblewere removed as they conflict with the nativeURL.absoluteURL.- If you were using them, you can for example still use
anyURL.absoluteURLinstead.
- If you were using them, you can for example still use
- go-toolkit#92 The accessibility feature
printPageNumbersis deprecated in favor ofpageNavigation.
Streamer
- A
selflink is not required anymore when parsing a RWPM.
Fixed
Navigator
- Fixed going to a link containing a fragment in the PDF navigator, for example from the table of contents.
Commits
- Fix normalization of URLs in
MinizipContainerby @mickael-menu in #553 - Don't require a
selflink when parsing a RWPM by @mickael-menu in #555 - Add support for streaming LCP publications by @mickael-menu in #557
- Remove
relativeURLandabsoluteURLhelpers onURLConvertibleby @mickael-menu in #561 - Fix
PDFNavigatorViewController.go(to: Link)by @mickael-menu in #563 - Add support for TDM Reservation Protocol metadata by @mickael-menu in #564
- Various accessibility metadata changes by @mickael-menu in #565
Full Changelog: 3.1.0...3.2.0
3.1.0
Take a look at the migration guide
Changelog
Added
Shared
- Support for streaming ZIP packages over HTTP. This lets you open a remote EPUB, audiobook, or any other ZIP-based publication without needing to download it first.
Deprecated
- The
close()andCloseableAPIs are now deprecated. Resources are automatically released upondeinit, which aligns better with Swift.
Fixed
LCP
- Fixed a regression that caused some LCP passphrases to no longer match the protected publication.
Navigator
- Fixed race condition when calling
submitPreferences()before the EPUB navigator is fully initialized.
Commits
- Add support for streaming ZIP packages over HTTP by @mickael-menu in #537
- Deprecate
close()andCloseableAPIs by @mickael-menu in #538 - Fix regression with LCP passphrases by @mickael-menu in #542
- Fix race condition in the EPUB navigator by @mickael-menu in #544
- Fix normalization of some URLs by @mickael-menu in #546
- Remove CI checks for Carthage integration on
developby @mickael-menu in #547 - Add the
ReadiumAdapterMiniziplibrary by @mickael-menu in #548 - Improve reliability of EPUB pagination view by @mickael-menu in #550
- Restore Minizip in
ReadiumSharedby @mickael-menu in #551
Full Changelog: 3.0.0...3.1.0
3.0.0
Take a look at the migration guide
Changelog
- The Readium Swift toolkit now requires a minimum of iOS 13.4.
- All the libraries are now available on a dedicated Readium CocoaPods Specs repository. Take a look at the migration guide to migrate.
Added
Shared
TableOfContentsServicecan now be used to customize the computation ofpublication.tableOfContents().
Streamer
- Support for standalone audio files and their metadata (contributed by @domkm).
Navigator
- The
EPUBNavigatorViewController.Configuration.disablePageTurnsWhileScrollingproperty disables horizontal swipes for navigating to previous or next resources when scroll mode is enabled. When set totrue, you must implement your own mechanism to move to the next resource (contributed by @alecdhansen).
LCP
- The table of contents of an LCP-protected PDF is now extracted directly from the PDF if the
tableOfContentsproperty inmanifest.jsonis empty.
Changed
- The
R2Shared,R2StreamerandR2Navigatorpackages are now calledReadiumShared,ReadiumStreamerandReadiumNavigator. - Many APIs now expect one of the new URL types (
RelativeURL,AbsoluteURL,HTTPURLandFileURL). This is helpful because:- It validates at compile time that we provide a URL that is supported.
- The API's capabilities are better documented, e.g. a download API could look like this :
download(url: HTTPURL) -> FileURL.
- Plenty of completion-based APIs were changed to use
asyncfunctions instead.
Shared
LinkandLocator'shrefare normalized as valid URLs to improve interoperability with the Readium Web toolkits.- You MUST migrate your database if you were persisting HREFs and Locators. Take a look at the migration guide for guidance.
- Links are not resolved to the
selfURL of a manifest anymore. However, you can still normalize the HREFs yourselves by callingManifest.normalizeHREFsToSelf(). Publication.localizedTitleis now optional, as we cannot guarantee a publication will always have a title.- A new
Formattype was introduced to augmentMediaTypewith more precise information about the format specifications of anAsset. Fetcherwas replaced with a simplerContainertype.PublicationAssetwas replaced byAsset, which contains aFormatand access to the underlyingContainerorResource.- The
ResourceErrorhierarchy was revamped and simplified (seeReadError). Now it is your responsibility to provide a localized user message for each error case. - The
Linkproperty key for archive-based publication assets (e.g. an EPUB/ZIP) is nowhttps://readium.org/webpub-manifest/properties#archiveinstead ofarchive. - The API of
HTTPServerslightly changed to be more future-proof. - The default
ZIPArchiveOpeneris now using ZIPFoundation instead of Minizip, with improved performances when reading ranges ofstoredZIP entries. - Improvements in the HTTP client:
- The
consumeclosure ofHTTPClient.stream()can now return an error to abort the HTTP request. HTTPErrorhas been refactored for improved type safety and a clearer separation of connection errors versus HTTP errors.DefaultHTTPClientno longer automatically restarts a failedHEADrequest as aGETto retrieve the response body. If you relied on this behavior, you can implement it using a customDefaultHTTPClientDelegate.httpClient(_:recoverRequest:fromError:).
- The
Streamer
- The
Streamerobject was deprecated in favor of smaller segregated APIs:AssetRetrieverandPublicationOpener.
Navigator
- EPUB: The
scrollpreference is now forced totruewhen rendering vertical text (e.g. CJK vertical). See this discussion for the rationale.
LCP
- The Readium LCP persistence layer was extracted to allow applications to provide their own implementations. Take a look at the migration guide for guidance.
Fixed
- #489 Fix crash related to Fuzi when compiling with Xcode 16 in release mode.
Shared
- Fixed a crash using
HTTPClient.download()when the device storage is full.
Navigator
- Optimized scrolling to an EPUB text-based locator if it contains a CSS selector.
- The first resource of a fixed-layout EPUB is now displayed on its own when spreads are enabled and the author has not set a
page-spread-*property. This is the default behavior in major reading apps like Apple Books. - #471 EPUB: Fixed reporting the current location when submitting new preferences.
- #459 Fixed the stack overflow issue that occurred when running the text-to-speech on an EPUB file with many empty resources.
- #490 Fixed issue loading fixed-layout EPUBs.
- #502 Fixed accessibility editing actions on iOS 18.
- #509 Removed the "Copy Link with Highlight" and "Writing Tools" EPUB editing actions on newer devices.
OPDS
- Fixed a data race in the OPDS 1 parser.
Commits
- Refactor HREF normalization and models by @mickael-menu in #358
- Validate
Link'shrefwhen creating aURLby @mickael-menu in #379 - Fix audiobook regression by @mickael-menu in #380
- Prevent crash when reporting the currently spoken word by @mickael-menu in #381
- Validate Link HREFs only when they are not templated by @mickael-menu in #387
- Fix audiobook regression by @mickael-menu in #393
- Drop
R2prefix by @mickael-menu in #412 - Don't require a
selflink to enable HTTP requests in a RWPM by @mickael-menu in #415 - Documentation by @mickael-menu in #384
- 3.0.0-alpha.1 by @mickael-menu in #420
- Rename
archiveLink property by @mickael-menu in #422 - Disable EPUB pagination with vertical text by @mickael-menu in #423
- Bump the minimum iOS version to 13 by @mickael-menu in #427
- Update
HTTPServerAPI by @mickael-menu in #424 - Enhance
AudioParserby @domkm in #414 - Remove
/prefix for exploded archive HREFs by @mickael-menu in #432 - Optimize scrolling to an EPUB locator with a CSS selector by @mickael-menu in #435
- Allow to customize the LCP device name by @mickael-menu in #437
- Async
HTTPClientand LCP APIs by @mickael-menu in #438 - Fix Test App using CocoaPods by @mickael-menu in #439
- Extract the LCP persistence layer by @mickael-menu in #442
- Handle URLs with aliases in
ExplodedArchiveby @domkm in #441 - First pass at marking types as Sendable by @domkm in #450
- Change
localizedCaseInsensitiveComparetolocalizedStandardCompareby @domkm in #451 - Improve URL equality by @mickael-menu in #453
- Normalize URLs on-the-fly when comparing by @mickael-menu in #454
- Fix first spread of FXL EPUBs by @mickael-menu in #470
- Fix reporting the current locator when submitting new preferences by @mickael-menu in #474
- Documentation for the v3 by @mickael-menu in #475
- Fix iOS 13 warnings by @mickael-menu in #476
- Extract localized error messages from the toolkit by @mickael-menu in #477
- Remove
Resourcesdeclaration fromReadiumSharedby @mickael-menu in #481 - Fix stack overflow when searching in a book with a large TOC by @vitaliynester in #473
- Fix stack overflow with TTS by @mickael-menu in #482
- Fix issue loading fixed-layout EPUBs by @mickael-menu in #493
- 3.0.0-alpha.3 by @mickael-menu in #496
- About screen sui by @FuzzzzyBoy in #492
- Swift UI refactor opds catalog selector by @FuzzzzyBoy in #497
- Various v3 fixes by @mickael-menu in #499
- Extract the table of contents from an LCP-protected PDF by @mickael-menu in ht...
3.0.0-beta.2
Take a look at the migration guide
Changelog
- The Readium Swift toolkit now requires a minimum of iOS 13.4.
- All the libraries are now available on a dedicated Readium CocoaPods Specs repository. Take a look at the migration guide to migrate.
Added
Navigator
- The
EPUBNavigatorViewController.Configuration.disablePageTurnsWhileScrollingproperty disables horizontal swipes for navigating to previous or next resources when scroll mode is enabled. When set totrue, you must implement your own mechanism to move to the next resource (contributed by @alecdhansen).
Changed
Shared
- The default
ZIPArchiveOpeneris now using ZIPFoundation instead of Minizip, with improved performances when reading ranges ofstoredZIP entries. - Improvements in the HTTP client:
- The
consumeclosure ofHTTPClient.stream()can now return an error to abort the HTTP request. HTTPErrorhas been refactored for improved type safety and a clearer separation of connection errors versus HTTP errors.DefaultHTTPClientno longer automatically restarts a failedHEADrequest as aGETto retrieve the response body. If you relied on this behavior, you can implement it using a customDefaultHTTPClientDelegate.httpClient(_:recoverRequest:fromError:).
- The
Fixed
Shared
- Fixed a crash using
HTTPClient.download()when the device storage is full.
Navigator
- #509 Removed the "Copy Link with Highlight" and "Writing Tools" EPUB editing actions on newer devices.
OPDS
- Fixed a data race in the OPDS 1 parser.
Commits
- Main actor conformance for the navigator delegates by @mickael-menu in #511
- Fix
PublicationService.get()by @mickael-menu in #513 - Remove unused Minizip from ReadiumStreamer by @mickael-menu in #517
- Migrate to ZIPFoundation by @mickael-menu in #518
- Fix various crashes and memory leaks by @mickael-menu in #520
- Update file headers by @mickael-menu in #525
- Fix EPUB deobfuscation of ranges by @mickael-menu in #526
- Optimize two-pages spread computation by @mickael-menu in #527
- Don't crash the app if the LCP database cannot be opened by @mickael-menu in #528
- Fix data race in
OPDS1Parserby @mickael-menu in #529 - Improve the HTTP client by @mickael-menu in #530
- feat: add option to disable horizontal swiping when settings.scroll is true by @alecdhansen in #531
- Remove the "Copy Link with Highlight" and "Writing Tools" EPUB editing actions by @mickael-menu in #532
- Fix concurrency warnings by @mickael-menu in #533
- 3.0.0-beta.2 by @mickael-menu in #534
New Contributors
- @alecdhansen made their first contribution in #531
Full Changelog: 3.0.0-beta.1...3.0.0-beta.2
3.0.0-beta.1
Take a look at the migration guide
Changelog
Added
Shared
TableOfContentsServicecan now be used to customize the computation ofpublication.tableOfContents().
LCP
- The table of contents of an LCP-protected PDF is now extracted directly from the PDF if the
tableOfContentsproperty inmanifest.jsonis empty.
Fixed
- #489 Fix crash related to Fuzi when compiling with Xcode 16 in release mode.
Navigator
- #502 Fixed accessibility editing actions on iOS 18.
Commits
- About screen sui by @FuzzzzyBoy in #492
- Swift UI refactor opds catalog selector by @FuzzzzyBoy in #497
- Fix accessibility editing actions on iOS 18 by @mickael-menu in #505
- Fix Fuzi with Xcode 16 by @mickael-menu in #504
- Various v3 fixes by @mickael-menu in #499
- Extract the table of contents from an LCP-protected PDF by @mickael-menu in #480
- 2.7.4 by @mickael-menu in #506
- SUI refactoring facets screen by @FuzzzzyBoy in #501
- 3.0.0-beta.1 by @mickael-menu in #507
New Contributors
- @FuzzzzyBoy made their first contribution in #492
Full Changelog: 3.0.0-alpha.3...3.0.0-beta.1
2.7.4
Take a look at the migration guide
Changelog
Fixed
- #489 Fix crash related to Fuzi when compiling with Xcode 16 in release mode.
Navigator
- #502 Fixed accessibility editing actions on iOS 18.
Commits
- Fix accessibility editing actions on iOS 18 by @mickael-menu in #505
- Fix Fuzi with Xcode 16 by @mickael-menu in #504
- 2.7.4 by @mickael-menu in #506
Full Changelog: 2.7.3...2.7.4
3.0.0-alpha.3
Take a look at the migration guide
Changelog
Fixed
Navigator
- #459 Fixed the stack overflow issue that occurred when running the text-to-speech on an EPUB file with many empty resources.
- #490 Fixed issue loading fixed-layout EPUBs.
What's Changed
- Remove
Resourcesdeclaration fromReadiumSharedby @mickael-menu in #481 - Fix stack overflow when searching in a book with a large TOC by @vitaliynester in #473
- Fix stack overflow with TTS by @mickael-menu in #482
- Fix build on Xcode 16 by @mickael-menu in #484
- 2.7.3 by @mickael-menu in #485
- Fix issue loading fixed-layout EPUBs by @mickael-menu in #493
- 3.0.0-alpha.3 by @mickael-menu in #496
New Contributors
- @vitaliynester made their first contribution in #473
Full Changelog: 3.0.0-alpha.2...3.0.0-alpha.3
2.7.3
Take a look at the migration guide
Changelog
- #483 Fix build on Xcode 16.
What's Changed
- Fix build on Xcode 16 by @mickael-menu in #484
- 2.7.3 by @mickael-menu in #485
Full Changelog: 2.7.2...2.7.3