This sample application demonstrates how to integrate the Readium Swift toolkit in your own reading app. Stable versions are published on TestFlight.
- Supported publication formats:
- EPUB 2 and 3 (reflowable and fixed layout)
- Custom styles
- Night & sepia modes
- CBZ
- EPUB 2 and 3 (reflowable and fixed layout)
- Readium LCP support
- Pagination and scrolling
- Table of contents
- OPDS 1.x and 2.0 support
- Right-to-left support
This project shows how to use Readium with several dependency managers: Swift Package Manager, Carthage and CocoaPods. To simplify the setup, we use XcodeGen to automatically generate the Xcode project files for a given dependency manager.
- Install XcodeGen and the dependency manager you need.
- Clone the project.
git clone https://github.com/readium/swift-toolkit.git cd swift-toolkit/TestApp
- Choose a type of project to generate.
⚠️ from themain
branch only:spm
(recommended) Integration with Swift Package Managercarthage
Integration with Carthagecocoapods
Integration with CocoaPods
- from the
main
ordevelop
branches:dev
Integration with local folders and SPM, for contributors
- Generate the Xcode project using the
Makefile
and your target of choice. This will download all the dependencies automatically.make spm
make <target>
command again after pulling any change from r2-testapp-swift
.
Building with Readium LCP requires additional dependencies, including the library R2LCPClient.framework
provided by EDRLab.
- Contact EDRLab to request your private
R2LCPClient.framework
. - If you integrate Readium with Swift Package Manager or Git submodules, install Carthage.
R2LCPClient.framework
is only available for Carthage or CocoaPods. - Generate the Xcode project with
make
, providing the URL given by EDRLab as theurl
parameter (Package.swift
for SPM,liblcp.json
for Carthage andlatest.podspec
for CocoaPods).make spm lcp=https://.../Package.swift