Readium

2.7.0

A toolkit for ebooks, audiobooks and comics written in Swift
readium/swift-toolkit

What's New

2.7.0

2024-04-05T17:36:53Z

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

Readium Swift Toolkit

Readium Mobile is a toolkit for ebooks, audiobooks and comics written in Swift & Kotlin.

This toolkit is a modular project, which follows the Readium Architecture.

A Test App demonstrates how to integrate the Readium Swift toolkit in your own reading app

Minimum Requirements

Readium iOS Swift compiler Xcode
develop 11.0 5.6.1 13.4
2.5.1 11.0 5.6.1 13.4
2.5.0 10.0 5.6.1 13.4
2.4.0 10.0 5.3.2 12.4

Using Readium

Readium libraries are distributed with Swift Package Manager (recommended), Carthage and CocoaPods. It's also possible to clone the repository (or a fork) and depend on the libraries locally.

The Test App contains examples on how to use all these dependency managers.

Swift Package Manager

From Xcode, open File > Add Packages and use Readium's GitHub repository for the package URL: https://github.com/readium/swift-toolkit.git.

You are then free to add one or more Readium libraries to your application. They are designed to work independently.

If you're stuck, find more information at developer.apple.com.

Carthage

Add the following to your Cartfile:

github "readium/swift-toolkit" ~> 2.7.0

Then, follow the usual Carthage steps to add the Readium libraries to your project.

Note that Carthage will build all Readium modules and their dependencies, but you are free to add only the ones you are actually using. The Readium libraries are designed to work independently.

Refer to the following table to know which dependencies are required for each Readium library.

R2Shared R2Streamer R2Navigator ReadiumOPDS ReadiumLCP
R2Shared ✔️ ✔️ ✔️ ✔️
ReadiumInternal ✔️ ✔️ ✔️ ✔️ ✔️
CryptoSwift ✔️ ✔️
DifferenceKit ✔️
Fuzi ✔️ ✔️ ✔️ ✔️ ✔️
Minizip ✔️ ✔️ ✔️ ✔️ ✔️
ReadiumGCDWebServer ✔️
SQLite.swift ✔️
SwiftSoup ✔️ ✔️ ✔️ ✔️ ✔️
ZIPFoundation ✔️

CocoaPods

Add the following pod statements to your Podfile for the Readium libraries you want to use:

pod 'R2Shared', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumShared.podspec'
pod 'R2Streamer', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumStreamer.podspec'
pod 'R2Navigator', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumNavigator.podspec'
pod 'ReadiumOPDS', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumOPDS.podspec'
pod 'ReadiumLCP', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumLCP.podspec'
pod 'ReadiumInternal', podspec: 'https://raw.githubusercontent.com/readium/swift-toolkit/2.7.0/Support/CocoaPods/ReadiumInternal.podspec'

# Required if you use R2Streamer.
pod 'ReadiumGCDWebServer', podspec: 'https://raw.githubusercontent.com/readium/GCDWebServer/4.0.0/GCDWebServer.podspec'

Take a look at CocoaPods's documentation for more information.

Local Git Clone

You may prefer to use a local Git clone if you want to contribute to Readium, or if you are using your own fork.

First, add the repository as a Git submodule of your app repository, then checkout the desired branch or tag:

git submodule add https://github.com/readium/swift-toolkit.git

Next, drag and drop the whole swift-toolkit folder into your project to import Readium as a Swift Package.

Finally, add the Readium libraries you want to use to your app target from the General tab, section Frameworks, Libraries, and Embedded Content.

Building with Readium LCP

Using the toolkit with Readium LCP requires additional dependencies, including the framework R2LCPClient.framework provided by EDRLab. Contact EDRLab to request your private R2LCPClient.framework and the setup instructions.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Thu May 02 2024 08:20:51 GMT-0900 (Hawaii-Aleutian Daylight Time)