Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ Pods/
# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Checkouts

Carthage/Build
6 changes: 6 additions & 0 deletions Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github "ZipArchive/ZipArchive"
github "cxa/UIMenuItem-CXAImageSupport"
github "jessesquires/JSQWebViewController"
github "alexpopov/ZFDragableModalTransition" "merge-carthage-into-zoonooz"
github "tadija/AEXML"
github "ArtSabintsev/FontBlaster"
6 changes: 6 additions & 0 deletions Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
github "tadija/AEXML" "3.0.0"
github "ArtSabintsev/FontBlaster" "2.1.3"
github "jessesquires/JSQWebViewController" "3.0.0"
github "cxa/UIMenuItem-CXAImageSupport" "v1.1"
github "alexpopov/ZFDragableModalTransition" "8da951efb4202385630d1cf7104b60d1208f807e"
github "ZipArchive/ZipArchive" "v1.2"
102 changes: 51 additions & 51 deletions Example/Example.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ DEPENDENCIES:

EXTERNAL SOURCES:
FolioReaderKit:
:path: "../"
:path: ../

SPEC CHECKSUMS:
AEXML: 716fb0a8decba4a3517324a71fee3685b30233d2
Expand All @@ -35,4 +35,6 @@ SPEC CHECKSUMS:
UIMenuItem-CXAImageSupport: 2945e2af4487414caad801ed8ff6ac8db274e986
ZFDragableModalTransition: 0d294eaaba6edfcb9839595de765f9ca06a4b524

COCOAPODS: 0.39.0
PODFILE CHECKSUM: 7bafcb0eb37bf78bf161a6ebcb80be176777e3a8

COCOAPODS: 1.0.0
1,079 changes: 1,079 additions & 0 deletions FolioReaderKit.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"DVTSourceControlWorkspaceBlueprintPrimaryRemoteRepositoryKey" : "3B612560170EA1D8B903F3973583DC66B5877296",
"DVTSourceControlWorkspaceBlueprintWorkingCopyRepositoryLocationsKey" : {

},
"DVTSourceControlWorkspaceBlueprintWorkingCopyStatesKey" : {
"3B612560170EA1D8B903F3973583DC66B5877296" : 0,
"9BCD10649C00B1FF6599C448235C882F32E44F3C" : 0
},
"DVTSourceControlWorkspaceBlueprintIdentifierKey" : "2421D5CE-8B6E-412D-9068-3D56462D7CCE",
"DVTSourceControlWorkspaceBlueprintWorkingCopyPathsKey" : {
"3B612560170EA1D8B903F3973583DC66B5877296" : "FolioReaderKit\/",
"9BCD10649C00B1FF6599C448235C882F32E44F3C" : "UIMenuItem-CXAImageSupport\/"
},
"DVTSourceControlWorkspaceBlueprintNameKey" : "FolioReaderKit",
"DVTSourceControlWorkspaceBlueprintVersion" : 204,
"DVTSourceControlWorkspaceBlueprintRelativePathToProjectKey" : "FolioReaderKit\/FolioReaderKit.xcodeproj",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoriesKey" : [
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:FolioReader\/FolioReaderKit.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "3B612560170EA1D8B903F3973583DC66B5877296"
},
{
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryURLKey" : "github.com:alexpopov\/UIMenuItem-CXAImageSupport.git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositorySystemKey" : "com.apple.dt.Xcode.sourcecontrol.Git",
"DVTSourceControlWorkspaceBlueprintRemoteRepositoryIdentifierKey" : "9BCD10649C00B1FF6599C448235C882F32E44F3C"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
BuildableName = "FolioReaderKit.framework"
BlueprintName = "FolioReaderKit"
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0D699141D035FA2003B4CCD"
BuildableName = "FolioReaderKitTests.xctest"
BlueprintName = "FolioReaderKitTests"
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
BuildableName = "FolioReaderKit.framework"
BlueprintName = "FolioReaderKit"
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
BuildableName = "FolioReaderKit.framework"
BlueprintName = "FolioReaderKit"
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "B0D6990A1D035FA2003B4CCD"
BuildableName = "FolioReaderKit.framework"
BlueprintName = "FolioReaderKit"
ReferencedContainer = "container:FolioReaderKit.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
19 changes: 19 additions & 0 deletions FolioReaderKit/FolioReaderKit.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//
// FolioReaderKit.h
// FolioReaderKit
//
// Created by Alex Popov on 2016-06-04.
// Copyright © 2016 FolioReader. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for FolioReaderKit.
FOUNDATION_EXPORT double FolioReaderKitVersionNumber;

//! Project version string for FolioReaderKit.
FOUNDATION_EXPORT const unsigned char FolioReaderKitVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <FolioReaderKit/PublicHeader.h>


26 changes: 26 additions & 0 deletions FolioReaderKit/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>
36 changes: 36 additions & 0 deletions FolioReaderKitTests/FolioReaderKitTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
//
// FolioReaderKitTests.swift
// FolioReaderKitTests
//
// Created by Alex Popov on 2016-06-04.
// Copyright © 2016 FolioReader. All rights reserved.
//

import XCTest
@testable import FolioReaderKit

class FolioReaderKitTests: XCTestCase {

override func setUp() {
super.setUp()
// Put setup code here. This method is called before the invocation of each test method in the class.
}

override func tearDown() {
// Put teardown code here. This method is called after the invocation of each test method in the class.
super.tearDown()
}

func testExample() {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}

func testPerformanceExample() {
// This is an example of a performance test case.
self.measureBlock {
// Put the code you want to measure the time of here.
}
}

}
24 changes: 24 additions & 0 deletions FolioReaderKitTests/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,27 @@ FolioReaderKit is an ePub reader and parser framework for iOS written in Swift.

### Installation

**FolioReaderKit** is available through [CocoaPods](http://cocoapods.org). To install
it, simply add the following lines to your Podfile:

**FolioReaderKit** is available through [CocoaPods](http://cocoapods.org) and [Carthage](https://github.com/Carthage/Carthage).

#### Cocoapods

To install it, simply add the following lines to your Podfile:

```ruby
use_frameworks!
pod 'FolioReaderKit'
```

#### Carthage

1. Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile)
```
github "FolioReader/FolioReaderKit"
```

2. Run `carthage update` and follow the steps as described in Carthage's [README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).

### Requirements

- iOS 8.0+
Expand Down
4 changes: 4 additions & 0 deletions Source/EPUBCore/FREpubParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
//

import UIKit
#if COCOAPODS
import SSZipArchive
#else
import ZipArchive
#endif
import AEXML

class FREpubParser: NSObject, SSZipArchiveDelegate {
Expand Down
7 changes: 7 additions & 0 deletions Source/FolioReaderPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,14 @@ extension UIWebView {

extension UIMenuItem {
convenience init(title: String, image: UIImage, action: Selector) {
#if COCOAPODS
self.init(title: title, action: action)
self.cxa_initWithTitle(title, action: action, image: image, hidesShadow: true)
#else
let settings = CXAMenuItemSettings()
settings.image = image
settings.shadowDisabled = true
self.init(title: title, action: action, settings: settings)
#endif
}
}