Skip to content

Releases: readium/swift-toolkit

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

2.7.0

05 Apr 17:36
b8631bc
Compare
Choose a tag to compare

Take a look at the migration guide

Changelog

Added

Shared

  • You can now use DefaultHTTPClientDelegate.httpClient(_:request:didReceive:completion:) to handle authentication challenges (e.g. Basic) with DefaultHTTPClient.

Navigator

  • The AudioNavigator API has been promoted to stable and ships with a new Preferences API.
  • The new NavigatorDelegate.didFailToLoadResourceAt(_:didFailToLoadResourceAt:withError:) delegate API notifies when an error occurs while loading a publication resource (contributed by @ettore).

Fixed

  • #390 Fixed logger not logging above the minimum severity level (contributed by @ettore).

Navigator

  • From iOS 13 to 15, PDF text selection is disabled on protected publications disabling the Copy editing action.
  • The Share editing action is disabled for any protected publication.
  • Fixed starting the TTS from the current EPUB position.
  • #396 Ensure we stop the activity indicator when an EPUB resource fails to load correctly (contributed by @ettore).

Streamer

  • #399 Zipped Audio Books and standalone audio files are now recognized.

Commits

New Contributors

Full Changelog: 2.6.1...2.7.0

2.6.1

31 Oct 15:07
a62962b
Compare
Choose a tag to compare

Take a look at the migration guide

Added

Navigator

  • You can now customize the playback refresh rate of _AudiobookNavigator in its configuration.
  • The EPUB navigator automatically moves to the next resource when VoiceOver reaches the end of the current one.

Changed

Navigator

  • You should not subclass PDFNavigatorViewController anymore. If you need to override setupPDFView, you can do so by implementing the PDFNavigatorDelegate protocol.

Fixed

Shared

  • Zipped Audio Book archives are now detected even if they contain bitmap entries.

Navigator

  • #344 EPUB: Fixed lost position when rotating quickly the screen several times.
  • #350 Restore the ability to subclass the PDFNavigatorViewController.
  • Fixed activating the scroll mode when VoiceOver is enabled in the EPUB navigator.

2.6.0

22 Sep 06:31
ce50635
Compare
Choose a tag to compare

Take a look at the migration guide

  • Support for Xcode 15.

Added

Navigator

  • The PublicationSpeechSynthesizer (TTS) now supports background playback by default.
    • You will need to enable the Audio Background Mode in your app's build info.
  • Support for non-linear EPUB resources with an opt-in in reading apps (contributed by @chrfalch in #332 and #331).
    1. Override loading non-linear resources with VisualNavigatorDelegate.navigator(_:shouldNavigateToLink:).
    2. Present a new EPUBNavigatorViewController by providing a custom readingOrder with only this resource to the constructor.

Fixed

Navigator

  • Improved performance when adding hundreds of HTML decorations at once.
  • Fixed broadcasting the PublicationSpeechSynthesizer with AirPlay when the screen is locked.

Changed

Navigator

  • AudioSession and NowPlayingInfo are now stable!
  • You need to provide the configuration of the Audio Session to the constructor of PublicationSpeechSynthesizer, instead of AVTTSEngine.

2.5.1

07 Jul 18:25
Compare
Choose a tag to compare

Take a look at the migration guide

  • The Readium toolkit now requires iOS 11.0+.

Added

Navigator

  • The auto spread setting is now available for fixed-layout EPUBs. It will display two pages in landscape and a single one in portrait.

Streamer

  • The EPUB content iterator now returns audio and video elements and fill in the progression and totalProgression locator properties.

Changed

Navigator

  • EPUBNavigatorViewController.firstVisibleElementLocator() now returns the first block element that is visible on the screen, even if it starts on previous pages.
    • This is used to make sure the user will not miss any context when restoring a TTS session in the middle of a resource.

Fixed

Navigator

  • Fixed the PDF auto spread setting and scaling pages when rotating the screen.
  • Fixed navigating to the first chapter of an audiobook with a single resource (contributed by @grighakobian).
  • Prevent auto-playing videos in EPUB publications.
  • Fixed various memory leaks and data races.
  • The WKWebView is now inspectable again with Safari starting from iOS 16.4.
  • Fixed crash in the PublicationSpeechSynthesizer when closing the navigator without stopping it first.
  • Fixed pausing the PublicationSpeechSynthesizer right before starting the utterance.
  • Fixed the audio session kept opened while the app is in the background and paused.
  • Fixed the Attribute dir redefined error when the EPUB resource already has a dir attribute.
  • #309 Fixed restoring the EPUB location when the application was killed in the background (contributed by @triin-ko).

Streamer

  • Fix issue with the TTS starting from the beginning of the chapter instead of the current position.

2.5.0

14 Apr 15:05
9e03397
Compare
Choose a tag to compare

Take a look at the migration guide

Added

Streamer

  • Positions computation, TTS and search is now enabled for Readium Web Publications conforming to the EPUB profile.

Navigator

  • New VisualNavigatorDelegate APIs to handle keyboard events (contributed by @lukeslu).
    • This can be used to turn pages with the arrow keys, for example.
  • Support for custom fonts with the EPUB navigator.
  • A brand new user preferences API for configuring the EPUB and PDF Navigators. This new API is easier and safer to use. To learn how to integrate it in your app, please refer to the user guide and migration guide.
    • New EPUB user preferences:
      • fontWeight - Base text font weight.
      • textNormalization - Normalize font style, weight and variants, which improves accessibility.
      • imageFilter - Filter applied to images in dark theme (darken, invert colors)
      • language - Language of the publication content.
      • readingProgression - Direction of the reading progression across resources, e.g. RTL.
      • typeScale - Scale applied to all element font sizes.
      • paragraphIndent - Text indentation for paragraphs.
      • paragraphSpacing - Vertical margins for paragraphs.
      • hyphens - Enable hyphenation.
      • ligatures - Enable ligatures in Arabic.
    • New PDF user preferences:
      • backgroundColor - Background color behind the document pages.
      • offsetFirstPage - Indicate if the first page should be displayed in its own spread.
      • pageSpacing - Spacing between pages in points.
      • readingProgression - Direction of the reading progression across resources, e.g. RTL.
      • scrollAxis - Scrolling direction when scroll is enabled.
      • scroll - Indicate if pages should be handled using scrolling instead of pagination.
      • spread - Enable dual-page mode.
      • visibleScrollbar - Indicate whether the scrollbar should be visible while scrolling.
  • The new DirectionalNavigationAdapter component helps you to turn pages with the arrows and space keyboard keys or taps on the edge of the screen.

Deprecated

Streamer

Navigator

Changed

Navigator

  • The define editing action replaces lookup on iOS 16+. When enabled, it will show both the "Look Up" and "Search Web" menu items.
  • Prevent navigation in the EPUB while it is being loaded.

Fixed

Navigator

  • Fixed a race condition issue with the AVTTSEngine, when pausing utterances.
  • Fixed crash with PublicationSpeechSynthesizer, when the currently played word cannot be resolved.
  • Fixed EPUB tap event sent twice when using a mouse (e.g. on Apple Silicon or with a mouse on an iPad).