Skip to content

Releases: readium/swift-toolkit

3.0.0

14 Jan 15:42
6ba50b6
Compare
Choose a tag to compare

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

Read more

3.0.0-beta.2

14 Jan 13:37
2dc5805
Compare
Choose a tag to compare
3.0.0-beta.2 Pre-release
Pre-release

Take a look at the migration guide

Changelog

Added

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).

Changed

Shared

  • 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:).

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

New Contributors

Full Changelog: 3.0.0-beta.1...3.0.0-beta.2

3.0.0-beta.1

19 Nov 13:05
2ace111
Compare
Choose a tag to compare
3.0.0-beta.1 Pre-release
Pre-release

Take a look at the migration guide

Changelog

Added

Shared

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

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.

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

New Contributors

Full Changelog: 3.0.0-alpha.3...3.0.0-beta.1

2.7.4

18 Nov 16:48
36f4151
Compare
Choose a tag to compare

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

Full Changelog: 2.7.3...2.7.4

3.0.0-alpha.3

19 Oct 13:53
ee6afa8
Compare
Choose a tag to compare
3.0.0-alpha.3 Pre-release
Pre-release

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

New Contributors

Full Changelog: 3.0.0-alpha.2...3.0.0-alpha.3

2.7.3

17 Sep 14:57
cca64ec
Compare
Choose a tag to compare

Take a look at the migration guide

Changelog

  • #483 Fix build on Xcode 16.

What's Changed

Full Changelog: 2.7.2...2.7.3

3.0.0-alpha.2

29 Aug 11:51
Compare
Choose a tag to compare
3.0.0-alpha.2 Pre-release
Pre-release

Take a look at the migration guide

Changelog

Added

Streamer

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

Changed

  • The Readium Swift toolkit now requires a minimum of iOS 13.
  • Plenty of completion-based APIs were changed to use async functions instead.

Shared

  • 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.

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

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.

What's Changed

Full Changelog: 3.0.0-alpha.1...3.0.0-alpha.2

2.7.2

04 Jun 15:02
686a1d4
Compare
Choose a tag to compare

Take a look at the migration guide

Changelog

Fixed

Shared

  • #444 Fixed resolving titles of search results when the table of contents items contain fragment identifiers.

Navigator

  • #428 Fixed crash with the share editing action on iOS 17.
  • #428 Fixed showing look up and translate editing actions on iOS 17.

What's Changed

Full Changelog: 2.7.1...2.7.2

3.0.0-alpha.1

07 May 16:08
df514d4
Compare
Choose a tag to compare
3.0.0-alpha.1 Pre-release
Pre-release

Take a look at the migration guide

Changelog

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.

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.

What's Changed

Full Changelog: 2.7.1...3.0.0-alpha.1

2.7.1

07 May 10:37
b2d6732
Compare
Choose a tag to compare

Take a look at the migration guide

Changelog

Added

LCP

  • #417 Support for the new 2.x LCP Profiles.

What's Changed

Full Changelog: 2.7.0...2.7.1