All notable changes to this project will be documented in this file.
Warning: Features marked as alpha may change or be removed in a future release without notice. Use with *caution.
- The EPUB navigator is now able to navigate to a
Locator
using itstext
context. This is useful for search results or highlights missing precise locations. - New
EPUBNavigatorViewController.evaluateJavaScript()
API to run a JavaScript on the currently visible HTML resource. - Support for Swift Package Manager (contributed by @stevenzeck).
- Removed
navigator(_:userContentController:didReceive:)
which is actually not needed since you can provide your ownWKScriptMessageHandler
toWKUserContentController
.
- Fixed receiving
EPUBNavigatorDelegate.navigator(_:setupUserScripts:)
for the first web view.
- All APIs deprecated in previous versions are now unavailable.
- New
EPUBNavigatorDelegate
APIs to inject custom JavaScript.- Override
navigator(_:setupUserScripts:)
to register additional user script to theWKUserContentController
of each web view. - Override
navigator(_:userContentController:didReceive:)
to receive callbacks from your scripts.
- Override
- Optimized performances of preloaded EPUB resources.
- EPUBs declaring multiple languages were laid out from right to left if the first language had an RTL reading
progression. Now if no reading progression is set, the
effectiveReadingProgression
will be LTR.
- Support for the new
Publication
model using the Content Protection for DRM rights and the Fetcher for resource access.- This replaces the
Container
andDRMLicense
objects which were needed by the navigator before.
- This replaces the
- Layout of right-to–left EPUB.
- Various EPUB navigation issues:
- Prevent breaking initial location when calling
updateUserSettings
too soon. - Fix weird scrolling behavior when double tapping on the edges to turn pages.
- Don't send intermediate incorrect locators when loading a pending locator.
- Prevent breaking initial location when calling
- Optimize positions calculation for LCP protected PDF.
- Support for pop-up footnotes (contributed by @tooolbox).
- This is an opt-in feature. Reading apps can customize how footnotes are presented to the user by implementing
NavigatorDelegate.navigator(_:shouldNavigateToNoteAt:content:referrer:)
. An example presenting footnotes in pop-ups is demonstrated in the Test App. - Footnotes' content is extracted with scinfu/SwiftSoup, which you may need to add to your app if you're not using Carthage or CocoaPods.
- This is an opt-in feature. Reading apps can customize how footnotes are presented to the user by implementing
- In EPUB's user settings:
- Support for hyphenation (contributed by @ehapmgs).
- Publishers' default styles are now used by default.
- Default line height is increased to improve readability.
- JavaScript errors are logged in Xcode's console for easier debugging.
- Upgraded to Readium CSS 1.0.0-beta.1.
- Two new fonts are available: AccessibleDfa and IA Writer Duospace.
- The file structure now follows strictly the one from ReadiumCSS's
dist/
, for easy upgrades and custom builds replacement.
- Jumping to a bookmark (
Locator
) located in a resource that is not already pre-loaded used to fail for some publications. - Touching interactive elements in fixed-layout EPUBs, when two-page spreads are enabled.