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

Commit

Permalink
Bump minimum version support to iOS 9 and removed legacy JSQWebViewCo…
Browse files Browse the repository at this point in the history
…ntroller
  • Loading branch information
hebertialmeida committed Jan 30, 2019
1 parent 7d50c50 commit 485c87c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 32 deletions.
8 changes: 0 additions & 8 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,6 @@
"${BUILT_PRODUCTS_DIR}/AEXML/AEXML.framework",
"${BUILT_PRODUCTS_DIR}/FolioReaderKit/FolioReaderKit.framework",
"${BUILT_PRODUCTS_DIR}/FontBlaster/FontBlaster.framework",
"${BUILT_PRODUCTS_DIR}/JSQWebViewControllerMod42/JSQWebViewControllerMod42.framework",
"${BUILT_PRODUCTS_DIR}/MenuItemKit/MenuItemKit.framework",
"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
Expand All @@ -561,7 +560,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AEXML.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FolioReaderKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FontBlaster.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQWebViewControllerMod42.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MenuItemKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework",
Expand All @@ -583,7 +581,6 @@
"${BUILT_PRODUCTS_DIR}/AEXML/AEXML.framework",
"${BUILT_PRODUCTS_DIR}/FolioReaderKit/FolioReaderKit.framework",
"${BUILT_PRODUCTS_DIR}/FontBlaster/FontBlaster.framework",
"${BUILT_PRODUCTS_DIR}/JSQWebViewControllerMod42/JSQWebViewControllerMod42.framework",
"${BUILT_PRODUCTS_DIR}/MenuItemKit/MenuItemKit.framework",
"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
Expand All @@ -595,7 +592,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AEXML.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FolioReaderKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FontBlaster.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQWebViewControllerMod42.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MenuItemKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework",
Expand All @@ -617,7 +613,6 @@
"${BUILT_PRODUCTS_DIR}/AEXML/AEXML.framework",
"${BUILT_PRODUCTS_DIR}/FolioReaderKit/FolioReaderKit.framework",
"${BUILT_PRODUCTS_DIR}/FontBlaster/FontBlaster.framework",
"${BUILT_PRODUCTS_DIR}/JSQWebViewControllerMod42/JSQWebViewControllerMod42.framework",
"${BUILT_PRODUCTS_DIR}/MenuItemKit/MenuItemKit.framework",
"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
Expand All @@ -629,7 +624,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AEXML.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FolioReaderKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FontBlaster.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQWebViewControllerMod42.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MenuItemKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework",
Expand All @@ -651,7 +645,6 @@
"${BUILT_PRODUCTS_DIR}/AEXML/AEXML.framework",
"${BUILT_PRODUCTS_DIR}/FolioReaderKit/FolioReaderKit.framework",
"${BUILT_PRODUCTS_DIR}/FontBlaster/FontBlaster.framework",
"${BUILT_PRODUCTS_DIR}/JSQWebViewControllerMod42/JSQWebViewControllerMod42.framework",
"${BUILT_PRODUCTS_DIR}/MenuItemKit/MenuItemKit.framework",
"${BUILT_PRODUCTS_DIR}/Realm/Realm.framework",
"${BUILT_PRODUCTS_DIR}/RealmSwift/RealmSwift.framework",
Expand All @@ -665,7 +658,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AEXML.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FolioReaderKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FontBlaster.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/JSQWebViewControllerMod42.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MenuItemKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Realm.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RealmSwift.framework",
Expand Down
2 changes: 1 addition & 1 deletion Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
platform :ios, '8.0'
platform :ios, '9.0'

use_frameworks!
inhibit_all_warnings!
Expand Down
10 changes: 3 additions & 7 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
PODS:
- AEXML (4.3.3)
- FolioReaderKit (1.3.0):
- FolioReaderKit (1.4.0):
- AEXML (= 4.3.3)
- FontBlaster (= 4.1.0)
- JSQWebViewControllerMod42 (= 6.1.1)
- MenuItemKit (= 3.1.3)
- RealmSwift (= 3.13.1)
- SSZipArchive (= 2.1.1)
- ZFDragableModalTransition (= 0.6)
- FontBlaster (4.1.0)
- JSQWebViewControllerMod42 (6.1.1)
- MenuItemKit (3.1.3)
- Nimble (7.3.1)
- Quick (1.3.2)
Expand All @@ -30,7 +28,6 @@ SPEC REPOS:
https://github.com/cocoapods/specs.git:
- AEXML
- FontBlaster
- JSQWebViewControllerMod42
- MenuItemKit
- Nimble
- Quick
Expand All @@ -45,9 +42,8 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
AEXML: 601f41fcaa7bda7605cad153b0f43db9ec006c0f
FolioReaderKit: a3e2e27e4daea783a4ff5ee655d1390260b4429f
FolioReaderKit: d9b71529ba6566f50fe62dcc9f538360f16d715c
FontBlaster: 127aa66419478d1c62926c7fdb39841633344a45
JSQWebViewControllerMod42: f693c6c3606ea26ddc4e88879f794b049bd9de87
MenuItemKit: 0f850e630b0a3d2bd80fec54db87ce0d2077ada2
Nimble: 04f732da099ea4d153122aec8c2a88fd0c7219ae
Quick: 2623cb30d7a7f41ca62f684f679586558f483d46
Expand All @@ -56,6 +52,6 @@ SPEC CHECKSUMS:
SSZipArchive: 14401ade5f8e82aba1ff03e9f88e9de60937ae60
ZFDragableModalTransition: 0d294eaaba6edfcb9839595de765f9ca06a4b524

PODFILE CHECKSUM: 17e357644d3dbd614167f19e9702e48140887ab9
PODFILE CHECKSUM: f5840071ca5121876c1758f6405302b47804dd07

COCOAPODS: 1.5.3
3 changes: 1 addition & 2 deletions FolioReaderKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Pod::Spec.new do |s|
s.social_media_url = 'https://twitter.com/hebertialmeida'

s.swift_version = '4.2'
s.platform = :ios, '8.0'
s.platform = :ios, '9.0'
s.requires_arc = true

s.source_files = [
Expand All @@ -35,7 +35,6 @@ Pod::Spec.new do |s|
s.dependency 'ZFDragableModalTransition', '0.6'
s.dependency 'AEXML', '4.3.3'
s.dependency 'FontBlaster', '4.1.0'
s.dependency 'JSQWebViewControllerMod42', '6.1.1'
s.dependency 'RealmSwift', '3.13.1'

end
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ To integrate FolioReaderKit into your Xcode project using CocoaPods, specify it

```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
platform :ios, '9.0'
use_frameworks!

target '<Your Target Name>' do
Expand Down Expand Up @@ -91,7 +91,7 @@ Then, follow the steps as described in Carthage's [README](https://github.com/Ca

## Requirements

- iOS 8.0+
- iOS 9.0+
- Xcode 10.1+

## Basic Usage
Expand Down
15 changes: 3 additions & 12 deletions Source/FolioReaderPage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import UIKit
import SafariServices
import MenuItemKit
import JSQWebViewControllerMod42

/// Protocol which is used from `FolioReaderPage`s.
@objc public protocol FolioReaderPageDelegate: class {
Expand Down Expand Up @@ -301,17 +300,9 @@ open class FolioReaderPage: UICollectionViewCell, UIWebViewDelegate, UIGestureRe
print("Email")
return true
} else if url.absoluteString != "about:blank" && scheme.contains("http") && navigationType == .linkClicked {

if #available(iOS 9.0, *) {
let safariVC = SFSafariViewController(url: request.url!)
safariVC.view.tintColor = self.readerConfig.tintColor
self.folioReader.readerCenter?.present(safariVC, animated: true, completion: nil)
} else {
let webViewController = WebViewController(url: request.url!)
let nav = UINavigationController(rootViewController: webViewController)
nav.view.tintColor = self.readerConfig.tintColor
self.folioReader.readerCenter?.present(nav, animated: true, completion: nil)
}
let safariVC = SFSafariViewController(url: request.url!)
safariVC.view.tintColor = self.readerConfig.tintColor
self.folioReader.readerCenter?.present(safariVC, animated: true, completion: nil)
return false
} else {
// Check if the url is a custom class based onClick listerner
Expand Down

2 comments on commit 485c87c

@nguyenquocdathcmus
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hebertialmeida
Can you help me!
When I install by cocaopod, JSQWebViewController still exist!

@hebertialmeida
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nguyenquocdathcmus You are probably using the wrong pod version, as you can see 1.4.0 (https://cocoapods.org/pods/FolioReaderKit) don't have any dependency on JSQWebViewController

Just update you environment and should be good to go.

Please sign in to comment.