Skip to content

vishalpatel-simformsolutions/r2-testapp-swift

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

755 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Readium Mobile Test App (Swift/iOS)

BSD-3

This sample application demonstrates how to integrate the Readium 2 Swift toolkit in your own reading app. Stable versions are published on TestFlight.


Features

  • EPUB 2.x and 3.x support
  • Readium LCP support
  • CBZ support
  • Custom styles
  • Night & sepia modes
  • Pagination and scrolling
  • Table of contents
  • OPDS 1.x and 2.0 support
  • EPUB fixed layout support
  • Right-to-left support

Building the Test App

This project shows how to use Readium 2 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.

  1. Choose a type of project to generate:
    • spm for Swift Package Manager (recommended)
    • carthage for Carthage
    • cocoapods for CocoaPods
    • dev for Git submodules with Swift Package Manager
  2. Install XcodeGen and the dependency manager you need.
  3. Clone the project.
    git clone https://github.com/readium/r2-testapp-swift.git
    cd r2-testapp-swift
  4. Generate the Xcode project using our Makefile and your target of choice. This will download all dependencies automatically.
    make spm

Warning: Since the Xcode project is not committed to this repository, you need to run the make <target> command again after pulling any change from r2-testapp-swift.

Building with Readium LCP

Building with Readium LCP requires additional dependencies, including the binary R2LCPClient.framework provided by EDRLab.

  1. Contact EDRLab to request your private R2LCPClient.framework.
  2. If you integrate Readium 2 with Swift Package Manager or Git submodules, install Carthage. R2LCPClient.framework is only available for Carthage or CocoaPods.
  3. Generate the Xcode project with make, providing the URL given by EDRLab as the url parameter (.json for Carthage or SPM and .podspec for CocoaPods).
    make spm lcp=https://...json

Integrating Readium 2 in your app

All migration steps necessary in reading apps to upgrade to major versions of the Readium toolkit are documented in the migration guide.

The Readium 2 toolkit is split in several independent modules, following the Readium Architecture:

To understand how to integrate these dependencies in your project, take a look at the Xcode project created by XcodeGen. Or even better, check out the generated project.yml file which describes the structure of the Xcode project in a human-friendly way.

Contributing

Follow the project on ZenHub.

The easiest way to contribute to the Readium 2 modules is to use the Git submodules integration.

make dev

About

๐Ÿ“– An EPUB & CBZ reading app for iOS

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • Swift 98.7%
  • Other 1.3%