Giter Club home page Giter Club logo

r2-testapp-swift's Introduction

⚠️ ᴛʜɪs ʀᴇᴘᴏsɪᴛᴏʀʏ ɪs ᴅᴇᴘʀᴇᴄᴀᴛᴇᴅ ⚠️

We moved all the r2-*-swift modules to a single repository: swift-toolkit.

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

r2-testapp-swift's People

Contributors

aferditamuriqi avatar mickael-menu-mantano avatar mickael-menu avatar iaomw avatar alexc4m avatar iosdevedrlab avatar nikitaevidentpoint avatar acamill avatar llemeurfr avatar tooolbox avatar ettore avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.