Skip to content

3.0.0

Latest
Compare
Choose a tag to compare
@mickael-menu mickael-menu released this 14 Jan 15:42
6ba50b6

Take a look at the migration guide

Changelog

Added

Shared

  • TableOfContentsService can now be used to customize the computation of publication.tableOfContents().

Streamer

  • Support for standalone audio files and their metadata (contributed by @domkm).

Navigator

  • The EPUBNavigatorViewController.Configuration.disablePageTurnsWhileScrolling property disables horizontal swipes for navigating to previous or next resources when scroll mode is enabled. When set to true, 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 tableOfContents property in manifest.json is empty.

Changed

  • The R2Shared, R2Streamer and R2Navigator packages are now called ReadiumShared, ReadiumStreamer and ReadiumNavigator.
  • Many APIs now expect one of the new URL types (RelativeURL, AbsoluteURL, HTTPURL and FileURL). 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 async functions instead.

Shared

  • Link and Locator's href are 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 self URL of a manifest anymore. However, you can still normalize the HREFs yourselves by calling Manifest.normalizeHREFsToSelf().
  • Publication.localizedTitle is now optional, as we cannot guarantee a publication will always have a title.
  • A new Format type was introduced to augment MediaType with more precise information about the format specifications of an Asset.
  • Fetcher was replaced with a simpler Container type.
  • PublicationAsset was replaced by Asset, which contains a Format and access to the underlying Container or Resource.
  • The ResourceError hierarchy was revamped and simplified (see ReadError). Now it is your responsibility to provide a localized user message for each error case.
  • The Link property key for archive-based publication assets (e.g. an EPUB/ZIP) is now https://readium.org/webpub-manifest/properties#archive instead of archive.
  • The API of HTTPServer slightly changed to be more future-proof.
  • The default ZIPArchiveOpener is now using ZIPFoundation instead of Minizip, with improved performances when reading ranges of stored ZIP entries.
  • Improvements in the HTTP client:
    • The consume closure of HTTPClient.stream() can now return an error to abort the HTTP request.
    • HTTPError has been refactored for improved type safety and a clearer separation of connection errors versus HTTP errors.
    • DefaultHTTPClient no longer automatically restarts a failed HEAD request as a GET to retrieve the response body. If you relied on this behavior, you can implement it using a custom DefaultHTTPClientDelegate.httpClient(_:recoverRequest:fromError:).

Streamer

  • The Streamer object was deprecated in favor of smaller segregated APIs: AssetRetriever and PublicationOpener.

Navigator

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

New Contributors

Full Changelog: 2.7.4...3.0.0