Releases: readium/swift-toolkit
Releases · readium/swift-toolkit
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
TableOfContentsService
can 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.disablePageTurnsWhileScrolling
property 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
tableOfContents
property inmanifest.json
is empty.
Changed
- The
R2Shared
,R2Streamer
andR2Navigator
packages are now calledReadiumShared
,ReadiumStreamer
andReadiumNavigator
. - Many APIs now expect one of the new URL types (
RelativeURL
,AbsoluteURL
,HTTPURL
andFileURL
). 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
andLocator
'shref
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 callingManifest.normalizeHREFsToSelf()
. Publication.localizedTitle
is now optional, as we cannot guarantee a publication will always have a title.- A new
Format
type was introduced to augmentMediaType
with more precise information about the format specifications of anAsset
. Fetcher
was replaced with a simplerContainer
type.PublicationAsset
was replaced byAsset
, which contains aFormat
and access to the underlyingContainer
orResource
.- The
ResourceError
hierarchy was revamped and simplified (seeReadError
). 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 nowhttps://readium.org/webpub-manifest/properties#archive
instead ofarchive
. - 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 ofstored
ZIP entries. - Improvements in the HTTP client:
- The
consume
closure ofHTTPClient.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 failedHEAD
request as aGET
to retrieve the response body. If you relied on this behavior, you can implement it using a customDefaultHTTPClientDelegate.httpClient(_:recoverRequest:fromError:)
.
- The
Streamer
- The
Streamer
object was deprecated in favor of smaller segregated APIs:AssetRetriever
andPublicationOpener
.
Navigator
- EPUB: The
scroll
preference is now forced totrue
when 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
'shref
when creating aURL
by @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
R2
prefix by @mickael-menu in #412 - Don't require a
self
link 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
archive
Link 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
HTTPServer
API by @mickael-menu in #424 - Enhance
AudioParser
by @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
HTTPClient
and 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
ExplodedArchive
by @domkm in #441 - First pass at marking types as Sendable by @domkm in #450
- Change
localizedCaseInsensitiveCompare
tolocalizedStandardCompare
by @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
Resources
declaration fromReadiumShared
by @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.disablePageTurnsWhileScrolling
property 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
ZIPArchiveOpener
is now using ZIPFoundation instead of Minizip, with improved performances when reading ranges ofstored
ZIP entries. - Improvements in the HTTP client:
- The
consume
closure ofHTTPClient.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 failedHEAD
request as aGET
to 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
OPDS1Parser
by @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
TableOfContentsService
can 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
tableOfContents
property inmanifest.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
- 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
Resources
declaration fromReadiumShared
by @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
3.0.0-alpha.2
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 augmentMediaType
with more precise information about the format specifications of anAsset
. Fetcher
was replaced with a simplerContainer
type.PublicationAsset
was replaced byAsset
, which contains aFormat
and access to the underlyingContainer
orResource
.- The
ResourceError
hierarchy was revamped and simplified (seeReadError
). 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 nowhttps://readium.org/webpub-manifest/properties#archive
instead ofarchive
. - The API of
HTTPServer
slightly changed to be more future-proof.
Streamer
- The
Streamer
object was deprecated in favor of smaller segregated APIs:AssetRetriever
andPublicationOpener
.
Navigator
- EPUB: The
scroll
preference is now forced totrue
when 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
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
- Rename
archive
Link 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
HTTPServer
API by @mickael-menu in #424 - Enhance
AudioParser
by @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
HTTPClient
and 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
ExplodedArchive
by @domkm in #441 - Fix resolving search results title by @mickael-menu in #446
- Fixed editing actions on iOS 17 by @mickael-menu in #447
- 2.7.2 by @mickael-menu in #448
- First pass at marking types as Sendable by @domkm in #450
- Change
localizedCaseInsensitiveCompare
tolocalizedStandardCompare
by @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
Full Changelog: 3.0.0-alpha.1...3.0.0-alpha.2
2.7.2
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
- Fix resolving search results title by @mickael-menu in #446
- Fixed editing actions on iOS 17 by @mickael-menu in #447
- 2.7.2 by @mickael-menu in #448
Full Changelog: 2.7.1...2.7.2
3.0.0-alpha.1
Take a look at the migration guide
Changelog
Changed
- The
R2Shared
,R2Streamer
andR2Navigator
packages are now calledReadiumShared
,ReadiumStreamer
andReadiumNavigator
. - Many APIs now expect one of the new URL types (
RelativeURL
,AbsoluteURL
,HTTPURL
andFileURL
). 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
andLocator
'shref
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 callingManifest.normalizeHREFsToSelf()
. Publication.localizedTitle
is now optional, as we cannot guarantee a publication will always have a title.
What's Changed
- Refactor HREF normalization and models by @mickael-menu in #358
- Validate
Link
'shref
when creating aURL
by @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
R2
prefix by @mickael-menu in #412 - Don't require a
self
link 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
Full Changelog: 2.7.1...3.0.0-alpha.1
2.7.1
Take a look at the migration guide
Changelog
Added
LCP
- #417 Support for the new 2.x LCP Profiles.
What's Changed
- Support for the new 2.x LCP Profiles by @mickael-menu in #418
- 2.7.1 by @mickael-menu in #419
Full Changelog: 2.7.0...2.7.1