Contains the definitions of the custom types (model) used across the readium-2 Swift projects.
Note: requires Swift 4.2 (and Xcode 10.1).
Carthage is a simple, decentralized dependency manager for Cocoa. To install R2Shared with Carthage:
-
Make sure Carthage is installed.
-
Update your Cartfile to include the following:
github "readium/r2-shared-swift" ~> 1.2.7
-
Run
carthage update
and add the appropriate framework.
CocoaPods is a dependency manager for Cocoa projects. To install R2Shared with CocoaPods:
-
Make sure CocoaPods is installed. (R2Shared 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
-
Update your Podfile to include the following:
use_frameworks! target 'YourAppTargetName' do pod 'R2Shared', :git => 'https://github.com/readium/r2-shared-swift.git', '~> 1.2.7' end
-
Run
pod install --repo-update
.
In your Swift files :
// Swift source file
import R2Shared