Releases: readium/swift-toolkit
Releases · readium/swift-toolkit
2.7.0
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) withDefaultHTTPClient
.
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
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
- Adjust the audio session strategy for the
AudioNavigator
by @mickael-menu in #357 - Fix Copy and Share editing actions by @mickael-menu in #364
- Fix 367: Fix initial location when in landscape landscape by @chrfalch in #368
- Fix TTS issue by @mickael-menu in #369
- Add a new form-based bug report issue template by @mickael-menu in #374
- Update file headers by @mickael-menu in #378
- Initial pass at
Locator.Locations.time
by @domkm in #382 - Preferences API for
AudioNavigator
by @mickael-menu in #389 - Compare loggable SeverityLevel by its numeric (not string) value by @ettore in #391
- Switch to pnpm by @mickael-menu in #392
- Turn off spinner if spread doesn't begin loading by @ettore in #397
- Sniff audio clips by @mickael-menu in #403
- Use ReadiumGCDWebServer* symbols by @ettore in #404
- Bubble up errors while loading Resources by @ettore in #400
- Fix ReadiumGCDWebServer integration for CocoaPods and Carthage by @mickael-menu in #406
- Handle authentication challenges with
DefaultHTTPClient
by @mickael-menu in #409 - 2.7.0 by @mickael-menu in #410
New Contributors
Full Changelog: 2.6.1...2.7.0
2.6.1
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 overridesetupPDFView
, you can do so by implementing thePDFNavigatorDelegate
protocol.
Fixed
Shared
- Zipped Audio Book archives are now detected even if they contain bitmap entries.
Navigator
2.6.0
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).
- Override loading non-linear resources with
VisualNavigatorDelegate.navigator(_:shouldNavigateToLink:)
. - Present a new
EPUBNavigatorViewController
by providing a customreadingOrder
with only this resource to the constructor.
- Override loading non-linear resources with
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
andNowPlayingInfo
are now stable!- You need to provide the configuration of the Audio Session to the constructor of
PublicationSpeechSynthesizer
, instead ofAVTTSEngine
.
2.5.1
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
andvideo
elements and fill in theprogression
andtotalProgression
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
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 whenscroll
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.
- New EPUB user preferences:
- 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
PublicationServer
is deprecated. See the the migration guide to migrate the HTTP server.
Navigator
- The EPUB
UserSettings
component is deprecated and replaced by the new Preferences API. Take a look at the user guide and migration guide.
Changed
Navigator
- The
define
editing action replaceslookup
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
Take a look at the migration guide
Added
Shared
- Support for the accessibility metadata in RWPM per Schema.org Accessibility Properties for Discoverability Vocabulary.
- Extract the raw content (text, images, etc.) of a publication.
Navigator
Streamer
- Parse EPUB accessibility metadata (see documentation).
Deprecated
Shared
Locator(link: Link)
is deprecated as it may create an incorrectLocator
if the linktype
is missing.- Use
publication.locate(Link)
instead.
- Use
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
Take a look at the migration guide
Added
Shared
- Get the sanitized
Locator
text ready for user display withlocator.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 aPublication
. - 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
andDefaultHTTPClient
take an optionaluserAgent
property to customize the user agent.
- A new
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.
- For example, it is called when clicking on internal links or programmatically calling
Deprecated
Shared
Publication.format
is now deprecated in favor of the newPublication.conforms(to:)
API which is more accurate.- For example, replace
publication.format == .epub
withpublication.conforms(to: .epub)
before opening a publication with theEPUBNavigatorViewController
.
- For example, replace
Changed
LCP
- The
LCPService
now uses a providedHTTPClient
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
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.