Skip to content
This repository has been archived by the owner on May 18, 2023. It is now read-only.

Update to swift 5 #33

Merged
merged 1 commit into from
Jun 14, 2019
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 .swift-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.0
5.0
1 change: 1 addition & 0 deletions Example/Podfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
platform :ios, '8.3'
use_frameworks!

target 'ReadabilityKit_Example' do
Expand Down
24 changes: 12 additions & 12 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
PODS:
- Ji (2.1.0):
- Ji/Ji (= 2.1.0)
- Ji/Ji (2.1.0):
- Ji/Ji-libxml
- Ji/Ji-libxml (2.1.0)
- ReadabilityKit (0.7.0):
- Ji
- Ji (5.0.0)
- ReadabilityKit (0.7.1):
- Ji (= 5.0.0)

DEPENDENCIES:
- ReadabilityKit (from `../`)

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Ji

EXTERNAL SOURCES:
ReadabilityKit:
:path: ../
:path: "../"

SPEC CHECKSUMS:
Ji: 21946da4e13425485ddd424edfaeeced0d80ad28
ReadabilityKit: 18382f7abda6cd768e8dd23f7e1fc814f5127944
Ji: d795fed288fe78658b404c88946d753b17d8d7f4
ReadabilityKit: 94cdec0266cf09b434829554b01eadaf3ce2862a

PODFILE CHECKSUM: b704b32dddbe11611f701c0548068289c2cc88f4
PODFILE CHECKSUM: 51d8e36b0be7e9863f061fdd6dd82cb519146085

COCOAPODS: 1.3.1
COCOAPODS: 1.7.1
33 changes: 10 additions & 23 deletions Example/ReadabilityKit.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@
607FACCD1AFB9204008FA782 /* Frameworks */,
607FACCE1AFB9204008FA782 /* Resources */,
E8845BC4AC6DB6E104C66B77 /* [CP] Embed Pods Frameworks */,
07BE57630D24C84443D2003E /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand All @@ -155,7 +154,7 @@
TargetAttributes = {
607FACCF1AFB9204008FA782 = {
CreatedOnToolsVersion = 6.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 1020;
};
};
};
Expand All @@ -164,6 +163,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -191,28 +191,13 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
07BE57630D24C84443D2003E /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ReadabilityKit_Example/Pods-ReadabilityKit_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E8845BC4AC6DB6E104C66B77 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-ReadabilityKit_Example/Pods-ReadabilityKit_Example-frameworks.sh",
"${PODS_ROOT}/Target Support Files/Pods-ReadabilityKit_Example/Pods-ReadabilityKit_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Ji/Ji.framework",
"${BUILT_PRODUCTS_DIR}/ReadabilityKit/ReadabilityKit.framework",
);
Expand All @@ -223,7 +208,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ReadabilityKit_Example/Pods-ReadabilityKit_Example-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ReadabilityKit_Example/Pods-ReadabilityKit_Example-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
FF90ED04199015556F2EECBA /* [CP] Check Pods Manifest.lock */ = {
Expand Down Expand Up @@ -323,6 +308,7 @@
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -362,6 +348,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
Expand All @@ -370,29 +357,29 @@
isa = XCBuildConfiguration;
baseConfigurationReference = 4F4AB35539AF14A978B8F170 /* Pods-ReadabilityKit_Example.debug.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ReadabilityKit/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
607FACF11AFB9204008FA782 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 374B5BD1C49566CBDE5FE6AA /* Pods-ReadabilityKit_Example.release.xcconfig */;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)";
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
INFOPLIST_FILE = ReadabilityKit/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MODULE_NAME = ExampleApp;
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
2 changes: 1 addition & 1 deletion Example/ReadabilityKit/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

return true
}
Expand Down
4 changes: 2 additions & 2 deletions ReadabilityKit.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ Pod::Spec.new do |s|
s.watchos.deployment_target = '2.0'
s.tvos.deployment_target = '9.0'

s.dependency 'Ji'
s.dependency 'Ji', '5.0.0'

s.source_files = [
'Sources/*.swift',
]

s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.0' }
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '5.0' }

end
2 changes: 1 addition & 1 deletion Sources/Readability+Async.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
//

public extension Readability {
public class func parse(data htmlData: Data, completion: @escaping (ReadabilityData?) -> ()) {
class func parse(data htmlData: Data, completion: @escaping (ReadabilityData?) -> ()) {
let isMainThread = Thread.isMainThread

DispatchQueue.global(qos: .default).async {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Readability+Networking.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ let readabilityUserAgent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) Appl

public extension Readability {

public class func parse(url: URL, completion: @escaping (ReadabilityData?) -> ()) {
class func parse(url: URL, completion: @escaping (ReadabilityData?) -> ()) {

let isMainThread = Thread.isMainThread

Expand Down
2 changes: 1 addition & 1 deletion Sources/Readability+String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

public extension Readability {

public class func parse(htmlString: String, completion: @escaping (ReadabilityData?) -> ()) {
class func parse(htmlString: String, completion: @escaping (ReadabilityData?) -> ()) {

guard let htmlData = htmlString.data(using: String.Encoding.utf8) else {
completion(.none)
Expand Down