Skip to content

migrate to swift 5.0 #11

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
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
6 changes: 3 additions & 3 deletions Libraries Usage/RxActionExample/Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
platform :ios, '8.0'
platform :ios, '10.0'
use_frameworks!

target 'RxActionExample' do

pod 'Action', '~> 2.0.0'
pod 'Action'

end

Expand All @@ -12,7 +12,7 @@ post_install do |installer|
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['ENABLE_TESTABILITY'] = 'YES'
config.build_settings['SWIFT_VERSION'] = '3.0'
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
Expand Down
35 changes: 23 additions & 12 deletions Libraries Usage/RxActionExample/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,19 +1,30 @@
PODS:
- Action (2.0.0):
- RxCocoa (~> 3.0)
- RxSwift (~> 3.0)
- RxCocoa (3.0.1):
- RxSwift (~> 3.0)
- RxSwift (3.0.1)
- Action (4.0.0):
- RxCocoa (~> 5.0)
- RxSwift (~> 5.0)
- RxCocoa (5.0.0):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxRelay (5.0.0):
- RxSwift (~> 5)
- RxSwift (5.0.0)

DEPENDENCIES:
- Action (~> 2.0.0)
- Action

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Action
- RxCocoa
- RxRelay
- RxSwift

SPEC CHECKSUMS:
Action: 0bc7f713038917e2d8b7a0cc71278a79c1db06c1
RxCocoa: 15a52fc590dcc700cb4a690a633b5c5184ce3a78
RxSwift: af5680055c4ad04480189c52d28385b1029493a6
Action: 0d14986aad0f1330aa27ce65d0cdeaacbb63d91c
RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8
RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f

PODFILE CHECKSUM: 4749c0cd4c60677e1d71f8634f2e69d25a34300b
PODFILE CHECKSUM: 0e3401fa6333ee48f01ff146cacd94b013502ad1

COCOAPODS: 1.1.1
COCOAPODS: 1.7.5
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
14F750851C6B300A005EED40 /* Frameworks */,
14F750861C6B300A005EED40 /* Resources */,
238D3BB8B043988CBDB3DC8B /* [CP] Embed Pods Frameworks */,
73D34DB189BA418F850FA322 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -133,6 +132,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -166,28 +166,22 @@
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RxActionExample/Pods-RxActionExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Action/Action.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Action.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxActionExample/Pods-RxActionExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
73D34DB189BA418F850FA322 /* [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-RxActionExample/Pods-RxActionExample-resources.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RxActionExample/Pods-RxActionExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
9C69966928C41B4841CAEF3F /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -196,13 +190,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RxActionExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -333,7 +330,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.RxActionExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -350,7 +347,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.RxActionExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,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 {
// Override point for customization after application launch.
return true
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class ViewController: UIViewController {
input.rx.text
.filter { $0 != nil }
.map { $0! }
.map { $0.characters.count > 0 } // map them into array of Observable<Bool>
.map { $0.count > 0 } // map them into array of Observable<Bool>
} // this allows us to use combineLatest, which fires up whenever any of the observables emits a signal

let validUsername = Observable.combineLatest(validUsernameCollection) { filters in
Expand All @@ -69,22 +69,22 @@ class ViewController: UIViewController {
NotificationCenter.default.addObserver(
self,
selector: #selector(keyboardWillShow(_:)),
name: NSNotification.Name.UIKeyboardWillShow,
name: UIResponder.keyboardWillShowNotification,
object: nil)

NotificationCenter.default.addObserver(
self,
selector: #selector(keyboardWillHide(_:)),
name: NSNotification.Name.UIKeyboardWillHide,
name: UIResponder.keyboardWillHideNotification,
object: nil)
}

deinit {
NotificationCenter.default.removeObserver(self)
}

func keyboardWillShow(_ notification: Notification) {
guard let keyboardFrame = (notification.userInfo?[UIKeyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue else { return }
@objc func keyboardWillShow(_ notification: Notification) {
guard let keyboardFrame = (notification.userInfo?[UIResponder.keyboardFrameEndUserInfoKey] as? NSValue)?.cgRectValue else { return }
let margin: CGFloat = 10.0
var responderY: CGFloat!
formFields.forEach { field in
Expand All @@ -101,7 +101,7 @@ class ViewController: UIViewController {
}
}

func keyboardWillHide(_ notification: Notification) {
@objc func keyboardWillHide(_ notification: Notification) {
UIView.animate(withDuration: 0.3, animations: {
self.currentTranslation = 0.0
self.stackView.transform = CGAffineTransform(translationX: 0.0, y: 0.0)
Expand Down
8 changes: 4 additions & 4 deletions Libraries Usage/RxAlamofireExample/Podfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
platform :ios, '9.0'
platform :ios, '10.0'
use_frameworks!

target 'RxAlamofireExample' do

pod 'RxAlamofire/RxCocoa', '~> 3.0.0'
pod 'ObjectMapper', '~> 2.2.0'
pod 'RxAlamofire/RxCocoa'
pod 'ObjectMapper'

end

Expand All @@ -13,7 +13,7 @@ post_install do |installer|
target.build_configurations.each do |config|
if config.name == 'Debug'
config.build_settings['ENABLE_TESTABILITY'] = 'YES'
config.build_settings['SWIFT_VERSION'] = '3.0'
config.build_settings['SWIFT_VERSION'] = '5.0'
end
end
end
Expand Down
51 changes: 32 additions & 19 deletions Libraries Usage/RxAlamofireExample/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,27 +1,40 @@
PODS:
- Alamofire (4.0.1)
- ObjectMapper (2.2.1)
- RxAlamofire/Core (3.0.0):
- Alamofire (~> 4.0)
- RxSwift (~> 3.0)
- RxAlamofire/RxCocoa (3.0.0):
- Alamofire (4.8.2)
- ObjectMapper (3.5.1)
- RxAlamofire/Core (5.0.0):
- Alamofire (~> 4.8)
- RxSwift (~> 5.0)
- RxAlamofire/RxCocoa (5.0.0):
- RxAlamofire/Core
- RxCocoa (~> 3.0)
- RxCocoa (3.0.1):
- RxSwift (~> 3.0)
- RxSwift (3.0.1)
- RxCocoa (~> 5.0)
- RxCocoa (5.0.0):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxRelay (5.0.0):
- RxSwift (~> 5)
- RxSwift (5.0.0)

DEPENDENCIES:
- ObjectMapper (~> 2.2.0)
- RxAlamofire/RxCocoa (~> 3.0.0)
- ObjectMapper
- RxAlamofire/RxCocoa

SPEC REPOS:
https://github.com/cocoapods/specs.git:
- Alamofire
- ObjectMapper
- RxAlamofire
- RxCocoa
- RxRelay
- RxSwift

SPEC CHECKSUMS:
Alamofire: 7682d43245de14874acd142ec137b144aa1dd335
ObjectMapper: 41e43e1a89f8060ef5ea5d04ba852e269a621d68
RxAlamofire: 0b1fa48f545fffe7f7a28af2086bcaa3b5946cc9
RxCocoa: 15a52fc590dcc700cb4a690a633b5c5184ce3a78
RxSwift: af5680055c4ad04480189c52d28385b1029493a6
Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3
ObjectMapper: 70187b8941977c62ccfb423caf6b50be405cabf0
RxAlamofire: e7875a012aff55345672d0f70a2a9cd6aeb0f211
RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8
RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f

PODFILE CHECKSUM: fd159d27023d0da367a6158bc273a6c42b5a9205
PODFILE CHECKSUM: 7cd190d4d1b20dfeae2e30defdfae3cac97eb96b

COCOAPODS: 1.1.1
COCOAPODS: 1.7.5
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@
14F750A31C6B61B5005EED40 /* Frameworks */,
14F750A41C6B61B5005EED40 /* Resources */,
86DE51D92810F001D71E9BA4 /* [CP] Embed Pods Frameworks */,
84817871FF0A709EB325C893 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
Expand Down Expand Up @@ -138,6 +137,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
Base,
);
Expand Down Expand Up @@ -165,34 +165,32 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
84817871FF0A709EB325C893 /* [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-RxAlamofireExample/Pods-RxAlamofireExample-resources.sh\"\n";
showEnvVarsInLog = 0;
};
86DE51D92810F001D71E9BA4 /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RxAlamofireExample/Pods-RxAlamofireExample-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/Alamofire/Alamofire.framework",
"${BUILT_PRODUCTS_DIR}/ObjectMapper/ObjectMapper.framework",
"${BUILT_PRODUCTS_DIR}/RxAlamofire/RxAlamofire.framework",
"${BUILT_PRODUCTS_DIR}/RxCocoa/RxCocoa.framework",
"${BUILT_PRODUCTS_DIR}/RxRelay/RxRelay.framework",
"${BUILT_PRODUCTS_DIR}/RxSwift/RxSwift.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Alamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ObjectMapper.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxAlamofire.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxCocoa.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxRelay.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/RxSwift.framework",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RxAlamofireExample/Pods-RxAlamofireExample-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RxAlamofireExample/Pods-RxAlamofireExample-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
CBB276E83F1AD26A0EFA03D4 /* [CP] Check Pods Manifest.lock */ = {
Expand All @@ -201,13 +199,16 @@
files = (
);
inputPaths = (
"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
"${PODS_ROOT}/Manifest.lock",
);
name = "[CP] Check Pods Manifest.lock";
outputPaths = (
"$(DERIVED_FILE_DIR)/Pods-RxAlamofireExample-checkManifestLockResult.txt",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -340,7 +341,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.RxAlamofireExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -357,7 +358,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.droidsonroids.RxAlamofireExample;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
Loading