Readium Mobile is a toolkit for ebooks, audiobooks and comics written in Swift & Kotlin.
Tip
Take a look at the guide to quickly get started. A Test App demonstrates how to integrate the Readium Swift toolkit in your own reading app.
β Implemented π§ Partially implemented π Planned π Want to do β Will not do
Format | Status |
---|---|
EPUB 2 | β |
EPUB 3 | β |
Readium Web Publication | π§ |
β | |
Readium Audiobook | β |
Zipped Audiobook | β |
Standalone audio files (MP3, AAC, etc.) | β |
Readium Divina | π§ |
CBZ (Comic Book ZIP) | π§ |
CBR (Comic Book RAR) | β |
DAISY | π |
A number of features are implemented only for some publication formats.
Feature | EPUB (reflow) | EPUB (FXL) | |
---|---|---|---|
Pagination | β | β | β |
Scrolling | β | π | β |
Right-to-left (RTL) | β | β | β |
Search in textual content | β | β | π |
Highlighting (Decoration API) | β | β | π |
Text-to-speech (TTS) | β | β | π |
Media overlays | π | π |
Feature | Status |
---|---|
OPDS Catalog 1.2 | β |
OPDS Catalog 2.0 | β |
Authentication for OPDS | π |
Readium LCP Automatic Key Retrieval | π |
Feature | Status |
---|---|
Readium LCP | β |
Adobe ACS | β |
Guides are available to help you make the most of the toolkit.
- Opening a publication β parse a publication package (EPUB, PDF, etc.) or manifest (RWPM) into Readium
Publication
models - Extracting the content of a publication β API to extract the text content of a publication for searching or indexing it
- Text-to-speech β read aloud the content of a textual publication using speech synthesis
- Accessibility β inspect accessibility metadata and present it to users
- Navigator - an overview of the Navigator to render a
Publication
's content to the user - Configuring the Navigator β setup and render Navigator user preferences (font size, colors, etc.)
- Font families in the EPUB navigator β support custom font families with reflowable EPUB publications
- Integrating the Navigator with SwiftUI β glue to setup the Navigator in a SwiftUI application
- Supporting Readium LCP β open and render LCP DRM protected publications
Readium | iOS | Swift compiler | Xcode |
---|---|---|---|
develop |
13.4 | 5.10 | 15.4 |
3.0.0 | 13.4 | 5.10 | 15.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 |
The toolkit's 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.
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.
Add the following to your Cartfile
:
github "readium/swift-toolkit" ~> 3.2.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.
ReadiumShared |
ReadiumStreamer |
ReadiumNavigator |
ReadiumOPDS |
ReadiumLCP |
ReadiumAdapterGCDWebServer |
ReadiumAdapterLCPSQLite |
|
---|---|---|---|---|---|---|---|
ReadiumShared |
βοΈ | βοΈ | βοΈ | βοΈ | βοΈ | βοΈ | |
ReadiumInternal |
βοΈ | βοΈ | βοΈ | βοΈ | βοΈ | ||
CryptoSwift |
βοΈ | βοΈ | |||||
DifferenceKit |
βοΈ | ||||||
ReadiumFuzi |
βοΈ | βοΈ | βοΈ | βοΈ | βοΈ | ||
ReadiumGCDWebServer |
βοΈ | ||||||
ReadiumZIPFoundation |
βοΈ | βοΈ | |||||
Minizip |
βοΈ | ||||||
SQLite.swift |
βοΈ | ||||||
SwiftSoup |
βοΈ | βοΈ | βοΈ | βοΈ | βοΈ |
Add the following pod
statements to your Podfile
for the Readium libraries you want to use:
source 'https://github.com/readium/podspecs'
source 'https://cdn.cocoapods.org/'
pod 'ReadiumShared', '~> 3.2.0'
pod 'ReadiumStreamer', '~> 3.2.0'
pod 'ReadiumNavigator', '~> 3.2.0'
pod 'ReadiumOPDS', '~> 3.2.0'
pod 'ReadiumLCP', '~> 3.2.0'
Take a look at CocoaPods's documentation for more information.
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.
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.
This project is tested with BrowserStack.