Git Product home page Git Product logo

simplified-ios's Introduction

Building With Adobe DRM

Building the Application

  1. git clone https://github.com/NYPL-Simplified/Simplified-iOS.git or git clone [email protected]:NYPL-Simplified/Simplified-iOS.git
  2. cd Simplified-iOS
  3. git submodule update --init --recursive
  4. Install Carthage if you haven't already.
  5. carthage bootstrap --platform ios --use-ssh. Note: If carthage bootstrap fails, you may need to create an installer package from our fork: https://github.com/NYPL-Simplified/Carthage.
  6. Symlink the unzipped "DRM_Connector_Prerelease" directory to "adobe-rmsdk" within the "Simplified-iOS" directory. (You will need to have obtained this binary from Adobe.)
  7. Build OpenSSL and cURL as described in the following "Building OpenSSL and cURL" section. Ensure you're in the "Simplified-iOS" directory before continuing to the next step.
  8. sh adobe-rmsdk-build.sh
  9. (cd readium-sdk; sh MakeHeaders.sh Apple) (parentheses included) to generate the headers for Readium.
  10. cp APIKeys.swift.example Simplified/APIKeys.swift and edit accordingly.
  11. cp Accounts.json.example Simplfiied/Accounts.json.
  12. open Simplified.xcodeproj
  13. Build.

Building OpenSSL and cURL

Follow the instructions in "adobe-rmsdk/RMSDK_User_Manual(obj).pdf" to build OpenSSL (section 12.1) and cURL (section 12.3). Be sure to note the following:

  • You will need to verify and edit the "build.sh" scripts for both OpenSSL and cURL to reflect the correct version numbers and local directory names (lines 11โ€“24).
  • You must add --enable-ipv6 to line 80 of Adobe's "build.sh" script used for building cURL. This necessary both due to Apple's requirements for IPv6 support and because the library may not build against recent iOS SDKs otherwise.
  • cURL 7.57.0 is known not to work and later versions are unlikely to work either. 7.50.0 is recommended.

Building Without Adobe DRM

Note: This configuration is not currently supported. In the interim, you should be able to get it to build via the following steps:

  1. git clone https://github.com/NYPL-Simplified/Simplified-iOS.git or git clone [email protected]:NYPL-Simplified/Simplified-iOS.git
  2. cd Simplified-iOS
  3. git submodule deinit adept-ios && git rm -rf adept-ios
  4. git submodule deinit adobe-content-filter && git rm -rf adobe-content-filter
  5. git submodule update --init --recursive
  6. Install Carthage if you haven't already.
  7. Remove "NYPL-Simplified/NYPLAEToolkit" and "AudioEngine.json" in Cartfile and Cartfile.resolved.
  8. carthage bootstrap --platform ios --use-ssh
  9. cp APIKeys.swift.example Simplified/APIKeys.swift and edit accordingly.
  10. cp Accounts.json.example Simplified/Accounts.json.
  11. (cd readium-sdk; sh MakeHeaders.sh Apple) (parentheses included) to generate the headers for Readium.
  12. open Simplified.xcodeproj
  13. Remove import of "Simplified+RMSDK.xcconfig" from "Simplified.xcconfig".
  14. Delete NYPLAEToolkit.framework and AudioEngine.framework from "Link Binary with Libraries", and remove input and output filepaths for AudioEngine.framework and NYPLAEToolkit.framework from Copy Frameworks (Carthage).
  15. Note: For now, we recommend keeping any unstaged changes as a single git stash until better dynamic build support is added.
  16. Build.

Contributing

This codebase follows Google's Objective-C Style Guide including the use of two-space indentation. Both Objective-C and Swift may be used for new code.

The primary services/singletons within the program are as follows:

  • NYPLAccount
  • NYPLBookCoverRegistry (used directly only by NYPLBookRegistry)
  • NYPLBookRegistry
  • NYPLConfiguration
  • NYPLKeychain
  • NYPLMyBooksDownloadCenter

All of the above contain appropriate documentation in the header files.

The rest of the program follows Apple's usual pattern of passive views, relatively passive models, and one-off controllers for integrating everything. Immutability is preferred wherever possible.

Questions, suggestions, and general discussion occurs via Slack: Email [email protected] for access.

License

Copyright ยฉ 2015 The New York Public Library, Astor, Lenox, and Tilden Foundations

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

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.