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.