Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

Commit 9150551

Browse files
Merge pull request #74 from alexpopov/carthage-support
Carthage Support
2 parents 270e810 + a3f6178 commit 9150551

File tree

16 files changed

+1414
-56
lines changed

16 files changed

+1414
-56
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ Pods/
2828
# Carthage
2929
#
3030
# Add this line if you want to avoid checking in source code from Carthage dependencies.
31-
# Carthage/Checkouts
31+
Carthage/Checkouts
3232

3333
Carthage/Build

Cartfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github "ZipArchive/ZipArchive"
2+
github "cxa/UIMenuItem-CXAImageSupport"
3+
github "jessesquires/JSQWebViewController"
4+
github "alexpopov/ZFDragableModalTransition" "merge-carthage-into-zoonooz"
5+
github "tadija/AEXML"
6+
github "ArtSabintsev/FontBlaster"

Cartfile.resolved

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
github "tadija/AEXML" "3.0.0"
2+
github "ArtSabintsev/FontBlaster" "2.1.3"
3+
github "jessesquires/JSQWebViewController" "3.0.0"
4+
github "cxa/UIMenuItem-CXAImageSupport" "v1.1"
5+
github "alexpopov/ZFDragableModalTransition" "8da951efb4202385630d1cf7104b60d1208f807e"
6+
github "ZipArchive/ZipArchive" "v1.2"

Example/Example.xcodeproj/project.pbxproj

Lines changed: 51 additions & 51 deletions
Large diffs are not rendered by default.

Example/Podfile.lock

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ DEPENDENCIES:
2222

2323
EXTERNAL SOURCES:
2424
FolioReaderKit:
25-
:path: "../"
25+
:path: ../
2626

2727
SPEC CHECKSUMS:
2828
AEXML: 716fb0a8decba4a3517324a71fee3685b30233d2
@@ -35,4 +35,6 @@ SPEC CHECKSUMS:
3535
UIMenuItem-CXAImageSupport: 2945e2af4487414caad801ed8ff6ac8db274e986
3636
ZFDragableModalTransition: 0d294eaaba6edfcb9839595de765f9ca06a4b524
3737

38-
COCOAPODS: 0.39.0
38+
PODFILE CHECKSUM: 7bafcb0eb37bf78bf161a6ebcb80be176777e3a8
39+
40+
COCOAPODS: 1.0.0

FolioReaderKit.xcodeproj/project.pbxproj

Lines changed: 1079 additions & 0 deletions
Large diffs are not rendered by default.

FolioReaderKit.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "3B612560170EA1D8B903F3973583DC66B5877296",
3+
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {
4+
5+
},
6+
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
7+
"3B612560170EA1D8B903F3973583DC66B5877296" : 0,
8+
"9BCD10649C00B1FF6599C448235C882F32E44F3C" : 0
9+
},
10+
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "2421D5CE-8B6E-412D-9068-3D56462D7CCE",
11+
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
12+
"3B612560170EA1D8B903F3973583DC66B5877296" : "FolioReaderKit\/",
13+
"9BCD10649C00B1FF6599C448235C882F32E44F3C" : "UIMenuItem-CXAImageSupport\/"
14+
},
15+
"DVTSourceControlWorkspaceBlueprintNameKey" : "FolioReaderKit",
16+
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
17+
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FolioReaderKit\/FolioReaderKit.xcodeproj",
18+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
19+
{
20+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:FolioReader\/FolioReaderKit.git",
21+
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
22+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "3B612560170EA1D8B903F3973583DC66B5877296"
23+
},
24+
{
25+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:alexpopov\/UIMenuItem-CXAImageSupport.git",
26+
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
27+
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "9BCD10649C00B1FF6599C448235C882F32E44F3C"
28+
}
29+
]
30+
}
Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "0730"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
18+
BuildableName = "FolioReaderKit.framework"
19+
BlueprintName = "FolioReaderKit"
20+
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
<TestableReference
32+
skipped = "NO">
33+
<BuildableReference
34+
BuildableIdentifier = "primary"
35+
BlueprintIdentifier = "B0D699141D035FA2003B4CCD"
36+
BuildableName = "FolioReaderKitTests.xctest"
37+
BlueprintName = "FolioReaderKitTests"
38+
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
39+
</BuildableReference>
40+
</TestableReference>
41+
</Testables>
42+
<MacroExpansion>
43+
<BuildableReference
44+
BuildableIdentifier = "primary"
45+
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
46+
BuildableName = "FolioReaderKit.framework"
47+
BlueprintName = "FolioReaderKit"
48+
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
49+
</BuildableReference>
50+
</MacroExpansion>
51+
<AdditionalOptions>
52+
</AdditionalOptions>
53+
</TestAction>
54+
<LaunchAction
55+
buildConfiguration = "Debug"
56+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
57+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
58+
launchStyle = "0"
59+
useCustomWorkingDirectory = "NO"
60+
ignoresPersistentStateOnLaunch = "NO"
61+
debugDocumentVersioning = "YES"
62+
debugServiceExtension = "internal"
63+
allowLocationSimulation = "YES">
64+
<MacroExpansion>
65+
<BuildableReference
66+
BuildableIdentifier = "primary"
67+
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
68+
BuildableName = "FolioReaderKit.framework"
69+
BlueprintName = "FolioReaderKit"
70+
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
71+
</BuildableReference>
72+
</MacroExpansion>
73+
<AdditionalOptions>
74+
</AdditionalOptions>
75+
</LaunchAction>
76+
<ProfileAction
77+
buildConfiguration = "Release"
78+
shouldUseLaunchSchemeArgsEnv = "YES"
79+
savedToolIdentifier = ""
80+
useCustomWorkingDirectory = "NO"
81+
debugDocumentVersioning = "YES">
82+
<MacroExpansion>
83+
<BuildableReference
84+
BuildableIdentifier = "primary"
85+
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
86+
BuildableName = "FolioReaderKit.framework"
87+
BlueprintName = "FolioReaderKit"
88+
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
89+
</BuildableReference>
90+
</MacroExpansion>
91+
</ProfileAction>
92+
<AnalyzeAction
93+
buildConfiguration = "Debug">
94+
</AnalyzeAction>
95+
<ArchiveAction
96+
buildConfiguration = "Release"
97+
revealArchiveInOrganizer = "YES">
98+
</ArchiveAction>
99+
</Scheme>

FolioReaderKit/FolioReaderKit.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//
2+
// FolioReaderKit.h
3+
// FolioReaderKit
4+
//
5+
// Created by Alex Popov on 2016-06-04.
6+
// Copyright © 2016 FolioReader. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
//! Project version number for FolioReaderKit.
12+
FOUNDATION_EXPORT double FolioReaderKitVersionNumber;
13+
14+
//! Project version string for FolioReaderKit.
15+
FOUNDATION_EXPORT const unsigned char FolioReaderKitVersionString[];
16+
17+
// In this header, you should import all the public headers of your framework using statements like #import <FolioReaderKit/PublicHeader.h>
18+
19+

FolioReaderKit/Info.plist

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>FMWK</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>$(CURRENT_PROJECT_VERSION)</string>
23+
<key>NSPrincipalClass</key>
24+
<string></string>
25+
</dict>
26+
</plist>
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// FolioReaderKitTests.swift
3+
// FolioReaderKitTests
4+
//
5+
// Created by Alex Popov on 2016-06-04.
6+
// Copyright © 2016 FolioReader. All rights reserved.
7+
//
8+
9+
import XCTest
10+
@testable import FolioReaderKit
11+
12+
class FolioReaderKitTests: XCTestCase {
13+
14+
override func setUp() {
15+
super.setUp()
16+
// Put setup code here. This method is called before the invocation of each test method in the class.
17+
}
18+
19+
override func tearDown() {
20+
// Put teardown code here. This method is called after the invocation of each test method in the class.
21+
super.tearDown()
22+
}
23+
24+
func testExample() {
25+
// This is an example of a functional test case.
26+
// Use XCTAssert and related functions to verify your tests produce the correct results.
27+
}
28+
29+
func testPerformanceExample() {
30+
// This is an example of a performance test case.
31+
self.measureBlock {
32+
// Put the code you want to measure the time of here.
33+
}
34+
}
35+
36+
}

FolioReaderKitTests/Info.plist

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>CFBundleDevelopmentRegion</key>
6+
<string>en</string>
7+
<key>CFBundleExecutable</key>
8+
<string>$(EXECUTABLE_NAME)</string>
9+
<key>CFBundleIdentifier</key>
10+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
11+
<key>CFBundleInfoDictionaryVersion</key>
12+
<string>6.0</string>
13+
<key>CFBundleName</key>
14+
<string>$(PRODUCT_NAME)</string>
15+
<key>CFBundlePackageType</key>
16+
<string>BNDL</string>
17+
<key>CFBundleShortVersionString</key>
18+
<string>1.0</string>
19+
<key>CFBundleSignature</key>
20+
<string>????</string>
21+
<key>CFBundleVersion</key>
22+
<string>1</string>
23+
</dict>
24+
</plist>

README.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,27 @@ FolioReaderKit is an ePub reader and parser framework for iOS written in Swift.
44

55
### Installation
66

7-
**FolioReaderKit** is available through [CocoaPods](http://cocoapods.org). To install
8-
it, simply add the following lines to your Podfile:
7+
8+
**FolioReaderKit** is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).
9+
10+
#### Cocoapods
11+
12+
To install it, simply add the following lines to your Podfile:
913

1014
```ruby
1115
use_frameworks!
1216
pod 'FolioReaderKit'
1317
```
1418

19+
#### Carthage
20+
21+
1. Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile)
22+
```
23+
github "FolioReader/FolioReaderKit"
24+
```
25+
26+
2. Run `carthage update` and follow the steps as described in Carthage's [README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).
27+
1528
### Requirements
1629
1730
- iOS 8.0+

Source/EPUBCore/FREpubParser.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@
77
//
88

99
import UIKit
10+
#if COCOAPODS
1011
import SSZipArchive
12+
#else
13+
import ZipArchive
14+
#endif
1115
import AEXML
1216

1317
class FREpubParser: NSObject, SSZipArchiveDelegate {

Source/FolioReaderPage.swift

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,14 @@ extension UIWebView {
572572

573573
extension UIMenuItem {
574574
convenience init(title: String, image: UIImage, action: Selector) {
575+
#if COCOAPODS
575576
self.init(title: title, action: action)
576577
self.cxa_initWithTitle(title, action: action, image: image, hidesShadow: true)
578+
#else
579+
let settings = CXAMenuItemSettings()
580+
settings.image = image
581+
settings.shadowDisabled = true
582+
self.init(title: title, action: action, settings: settings)
583+
#endif
577584
}
578585
}

0 commit comments

Comments
 (0)