This sample application demonstrates how to integrate the Readium Swift toolkit in your own reading app.
- 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 themainbranch only:spm(recommended) Integration with Swift Package ManagercarthageIntegration with CarthagecocoapodsIntegration with CocoaPods
- from the
mainordevelopbranches:devIntegration with local folders and SPM, for contributors
- Generate the Xcode project using the
Makefileand your target of choice. This will download all the dependencies automatically.make spm
Important
Since the Xcode project is not committed to this repository, you need to run the make <target> command again after pulling any change from the repository.
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.frameworkis only available for Carthage or CocoaPods. - Generate the Xcode project with
make, providing the URL given by EDRLab as theurlparameter (Package.swiftfor SPM,liblcp.jsonfor Carthage andlatest.podspecfor CocoaPods).make spm lcp=https://.../Package.swift