Skip to content

Releases: readium/swift-toolkit

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

2.4.0

26 Sep 12:33
Compare
Choose a tag to compare

Take a look at the migration guide

Added

Shared

Navigator

Streamer

Deprecated

Shared

  • Locator(link: Link) is deprecated as it may create an incorrect Locator if the link type is missing.
    • Use publication.locate(Link) instead.

Fixed

  • #244 Fixed build with Xcode 14 and Carthage/CocoaPods.

Navigator

  • Fixed memory leaks in the EPUB and PDF navigators.
  • #61 Fixed serving EPUB resources when the HREF contains an anchor or query parameters.
  • Performance issue with EPUB fixed-layout when spreads are enabled.
  • Disable scrolling in EPUB fixed-layout resources, in case the viewport is incorrectly set.
  • Fix vertically bouncing EPUB resources in iOS 16.

Streamer

  • Fixed memory leak in the PublicationServer.

LCP

  • The LCP authentication dialog is now fully localized and supports Dark Mode (contributed by @openm1nd).

2.3.0

21 Apr 09:43
2e0c647
Compare
Choose a tag to compare

Take a look at the migration guide

Added

Shared

  • Get the sanitized Locator text ready for user display with locator.text.sanitized().
  • A new Publication.conforms(to:) API to identify the profile of a publication.
  • Support for the conformsTo RWPM metadata, to identify the profile of a Publication.
  • Support for right-to-left PDF documents by extracting the reading progression from the ViewerPreferences/Direction metadata.
  • HTTP client:
    • A new HTTPClient.download() API to download HTTP resources to a temporary location.
    • HTTPRequest and DefaultHTTPClient take an optional userAgent property to customize the user agent.

Navigator

  • The new NavigatorDelegate.navigator(_:didJumpTo:) API is called every time the navigator jumps to an explicit location, which might break the linear reading progression.
    • For example, it is called when clicking on internal links or programmatically calling Navigator.go(to:), but not when turning pages.
    • You can use this callback to implement a navigation history by differentiating between continuous and discontinuous moves.

Deprecated

Shared

  • Publication.format is now deprecated in favor of the new Publication.conforms(to:) API which is more accurate.
    • For example, replace publication.format == .epub with publication.conforms(to: .epub) before opening a publication with the EPUBNavigatorViewController.

Changed

LCP

  • The LCPService now uses a provided HTTPClient instance for all HTTP requests.

Fixed

Navigator

  • #14 Backward compatibility (iOS 10+) of JavaScript files is now handled with Babel.
  • Throttle the reload of EPUB spreads to avoid losing the position when the reader gets back to the foreground.

LCP

  • Fixed the notification of acquisition progress.

2.2.0

09 Nov 11:11
b4a9358
Compare
Choose a tag to compare

Take a look at the migration guide

Added

Shared

  • Support for Paragraph Margins user setting.

Navigator

  • A new translate EPUB and PDF editing action is available for iOS 15.

Fixed

Shared

  • Improved performances of the search service used with EPUB.

Navigator

  • Fixed turning pages of an EPUB reflowable resource with an odd number of columns. A virtual blank trailing column is appended to the resource when displayed as two columns.