/r2-navigator-swift

A Swift implementation of the Readium 2 Navigator

Primary LanguageSwiftBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

BSD-3 Carthage compatible

r2-navigator-swift

A Swift implementation of the R2 Navigator

Changes and releases are documented in the Changelog

Adding the library to your iOS project

Note: requires Swift 4.2 (and Xcode 10.1).

Carthage

Carthage is a simple, decentralized dependency manager for Cocoa. To install R2Navigator with Carthage:

  1. Make sure Carthage is installed.

  2. Update your Cartfile to include the following:

    github "readium/r2-navigator-swift" "develop"
  3. Run carthage update and add the appropriate framework.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. To install R2Navigator with CocoaPods:

  1. Make sure CocoaPods is installed. (R2Navigator requires version 1.0.0 or greater.)

    # Using the default Ruby install will require you to use sudo when
    # installing and updating gems.
    [sudo] gem install cocoapods
  2. Update your Podfile to include the following:

    use_frameworks!
    
    target 'YourAppTargetName' do
        pod 'R2Navigator', :git => 'https://github.com/readium/r2-navigator-swift.git', :branch => 'develop'
    end
  3. Run pod install --repo-update.

Import

In your Swift files :

// Swift source file

import R2Navigator

Dependencies in this module

  • R2Shared : Contains the definitions of shared custom types used across the readium-2 Swift projects.