git clone https://github.com/NYPL/Simplified-iOS.git
orgit clone [email protected]:NYPL-Simplified/Simplified-iOS.git
cd Simplified-iOS
git submodule update --init --recursive
- Install Carthage if you haven't already.
carthage bootstrap --platform ios --use-ssh
- Symlink the "DRM_Connector_Prerelease" directory to "adobe-rmsdk" within the "Simplified-iOS" directory. (You will need to have obtained the Adobe DRM Connector prerelease from Adobe.)
- 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.
sh adobe-rmsdk-build.sh
cp APIKeys.swift.example Simplified/APIKeys.swift
and edit accordingly.- Copy
ReaderClientCert.sig
(obtained elsewhere) toSimplified/ReaderClientCert.sig
. - Copy
Accounts.json
(obtained elsewhere) toSimplified/Accounts.json
. open Simplified.xcodeproj
- Build.
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.
Note: This configuration is not currently supported. In the interim, you should be able to get it to build via the following steps:
git clone https://github.com/NYPL/Simplified-iOS.git
orgit clone [email protected]:NYPL-Simplified/Simplified-iOS.git
cd Simplified-iOS
git submodule deinit adept-ios && git rm -rf adept-ios
git submodule deinit adobe-content-filter && git rm -rf adobe-content-filter
git submodule update --init --recursive
- Install Carthage if you haven't already.
carthage bootstrap --platform ios --use-ssh
cp APIKeys.swift.example Simplified/APIKeys.swift
and edit accordingly.open Simplified.xcodeproj
- Remove "Simplified+RMSDK.xcconfig" from the project.
- Delete "libADEPT.a" and "libAdobe Content Filter.a" from "Link Binary with Libraries" for the "SimplyE" target.
- Copy
Accounts.json
(obtained elsewhere) toSimplified/Accounts.json
. - Build.
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 byNYPLBookRegistry
)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 and suggestions should be submitted as GitHub issues and tagged with
the appropriate labels. More in-depth discussion occurs via Slack: Email
[email protected]
for access.
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.