Skip to content
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

Updated RxSwift to 6.0 and ios.deployment_target #102

Merged
merged 13 commits into from
Jan 11, 2021
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
32 changes: 25 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
.DS_Store
# Xcode

sourcekitten-output.json
docs/
/.build
/Packages
/*.xcodeproj
**/xcuserdata
**/xcshareddata
Pods/
Carthage/
Examples/**/Podfile.lock
*.xcconfig
*.framework.zip
.idea/

# CocoaPods

Pods/
Examples/**/Podfile.lock

# Carthage

Carthage/

# Various

.DS_Store

# Swift Package Manager

.build/
Packages/
.swiftpm

# AppCode

.idea/
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
osx_image: xcode10.2
osx_image: xcode12.3
language: objective-c
sudo: required
env:
global:
- PROJECT="RxKeyboard.xcodeproj"
- SCHEME="RxKeyboard-Package"
- IOS_SDK="iphonesimulator"
- MACOS_SDK="macosx10.14"
- TVOS_SDK="appletvsimulator12.2"
- WATCHOS_SDK="watchsimulator5.2"
- MACOS_SDK="macosx11.0"
- TVOS_SDK="appletvsimulator9.0"
- WATCHOS_SDK="watchsimulator3.0"
- FRAMEWORK="RxKeyboard"
matrix:
- SDK="$IOS_SDK" TEST=0 SWIFT_VERSION=5.0 DESTINATION="platform=iOS Simulator,name=iPhone 8"
- SDK="$IOS_SDK" TEST=0 SWIFT_VERSION=5.1 DESTINATION="platform=iOS Simulator,name=iPhone 8"

install:
- swift --version
Expand Down Expand Up @@ -49,7 +49,7 @@ before_deploy:
- bundle exec swiftproj configure-scheme --project RxKeyboard.xcodeproj --scheme RxKeyboard-Package --buildable-targets RxKeyboard
- bundle exec swiftproj remove-framework --project RxKeyboard.xcodeproj --target RxKeyboard --framework RxCocoa.framework
- bundle exec swiftproj remove-framework --project RxKeyboard.xcodeproj --target RxKeyboard --framework RxCocoaRuntime.framework
- carthage bootstrap
- ./carthage.sh bootstrap
- carthage build --no-skip-current --verbose | xcpretty -c
- carthage archive RxKeyboard

Expand Down
2 changes: 1 addition & 1 deletion Cartfile
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" ~> 5.0.0
github "ReactiveX/RxSwift" ~> 6.0.0
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1 +1 @@
github "ReactiveX/RxSwift" "5.0.1"
github "ReactiveX/RxSwift" "6.0.0"
58 changes: 29 additions & 29 deletions Example/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
PODS:
- CGFloatLiteral (0.5.0)
- ManualLayout (1.3.0)
- ReusableKit (2.1.0):
- ReusableKit/Core (= 2.1.0)
- ReusableKit/Core (2.1.0)
- RxCocoa (5.0.0):
- RxRelay (~> 5)
- RxSwift (~> 5)
- RxKeyboard (1.0.0):
- RxCocoa (~> 5.0)
- RxSwift (~> 5.0)
- RxRelay (5.0.0):
- RxSwift (~> 5)
- RxSwift (5.0.0)
- SnapKit (5.0.0)
- SwiftyColor (1.2.0)
- SwiftyImage (1.5.0)
- Then (2.4.0)
- "UITextView+Placeholder (1.2.1)"
- ReusableKit (3.0.0):
- ReusableKit/Core (= 3.0.0)
- ReusableKit/Core (3.0.0)
- RxCocoa (6.0.0):
- RxRelay (= 6.0.0)
- RxSwift (= 6.0.0)
- RxKeyboard (2.0.0):
- RxCocoa (~> 6.0)
- RxSwift (~> 6.0)
- RxRelay (6.0.0):
- RxSwift (= 6.0.0)
- RxSwift (6.0.0)
- SnapKit (5.0.1)
- SwiftyColor (1.2.1)
- SwiftyImage (1.6.0)
- Then (2.7.0)
- "UITextView+Placeholder (1.4.0)"

DEPENDENCIES:
- CGFloatLiteral
Expand All @@ -31,7 +31,7 @@ DEPENDENCIES:
- "UITextView+Placeholder"

SPEC REPOS:
https://github.com/cocoapods/specs.git:
trunk:
- CGFloatLiteral
- ManualLayout
- ReusableKit
Expand All @@ -51,17 +51,17 @@ EXTERNAL SOURCES:
SPEC CHECKSUMS:
CGFloatLiteral: 0328648f666e3cb2263d5ee3972df9d320786d25
ManualLayout: 68ac8cfa6b5f656f7a9fadec3730208b95986880
ReusableKit: d0b040de03b293288b0ca27a78602691d3346d9b
RxCocoa: fcf32050ac00d801f34a7f71d5e8e7f23026dcd8
RxKeyboard: 6683c4344304a00f943c158bd8a43ce5469c82a7
RxRelay: 4f7409406a51a55cd88483f21ed898c234d60f18
RxSwift: 8b0671caa829a763bbce7271095859121cbd895f
SnapKit: fd22d10eb9aff484d79a8724eab922c1ddf89bcf
SwiftyColor: ac23e6c0b561838c1ef0f554ff170cceba14546b
SwiftyImage: b4f0523c4a775c79c45dd328f42ed9b3111d5898
Then: 71866660c7af35a7343831f7668e7cd2b62ee0f2
"UITextView+Placeholder": 0c3efd97f37ea64bde7f34cc6e90fe02e87b3909
ReusableKit: e5f853ad4652e411f96b6119b2488afa12929be6
RxCocoa: 3f79328fafa3645b34600f37c31e64c73ae3a80e
RxKeyboard: aefd4787ca8be28a4470cb871141fb50e105f900
RxRelay: 8d593be109c06ea850df027351beba614b012ffb
RxSwift: c14e798c59b9f6e9a2df8fd235602e85cc044295
SnapKit: 97b92857e3df3a0c71833cce143274bf6ef8e5eb
SwiftyColor: a2f468071c1b96be1ba41a0be7cf70d645cd7dcc
SwiftyImage: 65c71a147f417fc0fe137d17b135aaa666279a09
Then: acfe0be7e98221c6204e12f8161459606d5d822d
"UITextView+Placeholder": d7b0c400921f66523f3a85d74f774512e14f6502

PODFILE CHECKSUM: 217b0b1c7b2faddc54272a5bde63843c54f48190

COCOAPODS: 1.6.1
COCOAPODS: 1.10.0
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
source 'https://rubygems.org'
ruby '~> 2.3'

gem 'cocoapods', '~> 1.6'
gem 'cocoapods', '~> 1.10'
gem 'swiftproj'
80 changes: 47 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,83 +1,97 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (3.0.0)
activesupport (4.2.11.1)
i18n (~> 0.7)
CFPropertyList (3.0.3)
activesupport (5.2.4.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0)
algoliasearch (1.27.5)
httpclient (~> 2.8, >= 2.8.3)
json (>= 1.5.1)
atomos (0.1.3)
claide (1.0.2)
cocoapods (1.6.2)
activesupport (>= 4.0.2, < 5)
claide (1.0.3)
cocoapods (1.10.0)
addressable (~> 2.6)
claide (>= 1.0.2, < 2.0)
cocoapods-core (= 1.6.2)
cocoapods-deintegrate (>= 1.0.2, < 2.0)
cocoapods-downloader (>= 1.2.2, < 2.0)
cocoapods-core (= 1.10.0)
cocoapods-deintegrate (>= 1.0.3, < 2.0)
cocoapods-downloader (>= 1.4.0, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.3.1, < 2.0)
cocoapods-trunk (>= 1.4.0, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored2 (~> 3.1)
escape (~> 0.0.4)
fourflusher (>= 2.2.0, < 3.0)
fourflusher (>= 2.3.0, < 3.0)
gh_inspector (~> 1.0)
molinillo (~> 0.6.6)
nap (~> 1.0)
ruby-macho (~> 1.4)
xcodeproj (>= 1.8.1, < 2.0)
cocoapods-core (1.6.2)
activesupport (>= 4.0.2, < 6)
xcodeproj (>= 1.19.0, < 2.0)
cocoapods-core (1.10.0)
activesupport (> 5.0, < 6)
addressable (~> 2.6)
algoliasearch (~> 1.0)
concurrent-ruby (~> 1.1)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
netrc (~> 0.11)
public_suffix
typhoeus (~> 1.0)
cocoapods-deintegrate (1.0.4)
cocoapods-downloader (1.2.2)
cocoapods-downloader (1.4.0)
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.1.0)
cocoapods-trunk (1.3.1)
cocoapods-trunk (1.5.0)
nap (>= 0.8, < 2.0)
netrc (~> 0.11)
cocoapods-try (1.1.0)
cocoapods-try (1.2.0)
colored2 (3.1.2)
concurrent-ruby (1.1.5)
concurrent-ruby (1.1.7)
escape (0.0.4)
fourflusher (2.2.0)
ethon (0.12.0)
ffi (>= 1.3.0)
ffi (1.14.2)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
gh_inspector (1.1.3)
i18n (0.9.5)
httpclient (2.8.3)
i18n (1.8.6)
concurrent-ruby (~> 1.0)
minitest (5.11.3)
json (2.5.1)
minitest (5.14.2)
molinillo (0.6.6)
nanaimo (0.2.6)
nanaimo (0.3.0)
nap (1.1.0)
netrc (0.11.0)
public_suffix (4.0.6)
ruby-macho (1.4.0)
swiftproj (0.1.0)
colored2 (>= 3.0)
xcodeproj (>= 1.5)
thread_safe (0.3.6)
tzinfo (1.2.5)
typhoeus (1.4.0)
ethon (>= 0.9.0)
tzinfo (1.2.9)
thread_safe (~> 0.1)
xcodeproj (1.9.0)
xcodeproj (1.19.0)
CFPropertyList (>= 2.3.3, < 4.0)
atomos (~> 0.1.3)
claide (>= 1.0.2, < 2.0)
colored2 (~> 3.1)
nanaimo (~> 0.2.6)
nanaimo (~> 0.3.0)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.6)
cocoapods (~> 1.10)
swiftproj

RUBY VERSION
ruby 2.3.1p112

BUNDLED WITH
1.17.3
2.2.4
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/ReactiveX/RxSwift.git",
"state": {
"branch": null,
"revision": "b3e888b4972d9bc76495dd74d30a8c7fad4b9395",
"version": "5.0.1"
"revision": "c8742ed97fc2f0c015a5ea5eddefb064cd7532d2",
"version": "6.0.0"
}
}
]
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// swift-tools-version:5.0
// swift-tools-version:5.1

import PackageDescription

Expand All @@ -8,7 +8,7 @@ let package = Package(
.library(name: "RxKeyboard", targets: ["RxKeyboard"]),
],
dependencies: [
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "5.0.0")),
.package(url: "https://github.com/ReactiveX/RxSwift.git", .upToNextMajor(from: "6.0.0")),
],
targets: [
.target(name: "RxKeyboard", dependencies: ["RxSwift", "RxCocoa"]),
Expand Down
3 changes: 2 additions & 1 deletion RxKeyboard.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
"0.9.0": "https://github.com/RxSwiftCommunity/RxKeyboard/releases/download/0.9.0/RxKeyboard.framework.zip",
"0.9.1": "https://github.com/RxSwiftCommunity/RxKeyboard/releases/download/0.9.1/RxKeyboard.framework.zip",
"0.9.2": "https://github.com/RxSwiftCommunity/RxKeyboard/releases/download/0.9.2/RxKeyboard.framework.zip",
"1.0.0": "https://github.com/RxSwiftCommunity/RxKeyboard/releases/download/1.0.0/RxKeyboard.framework.zip"
"1.0.0": "https://github.com/RxSwiftCommunity/RxKeyboard/releases/download/1.0.0/RxKeyboard.framework.zip",
"2.0.0": "https://github.com/RxSwiftCommunity/RxKeyboard/releases/download/2.0.0/RxKeyboard.framework.zip",
}
12 changes: 6 additions & 6 deletions RxKeyboard.podspec
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
Pod::Spec.new do |s|
s.name = 'RxKeyboard'
s.version = '1.0.0'
s.version = '2.0.0'
s.summary = 'Reactive Keyboard in iOS'
s.homepage = 'https://github.com/RxSwiftCommunity/RxKeyboard'
s.license = { :type => 'MIT', :file => 'LICENSE' }
s.author = { 'Suyeol Jeon' => '[email protected]' }
s.source = { :git => 'https://github.com/RxSwiftCommunity/RxKeyboard.git',
:tag => s.version.to_s }
s.source_files = 'Sources/**/*.swift'
s.frameworks = 'UIKit', 'Foundation'
s.frameworks = 'UIKit'
s.requires_arc = true
s.swift_version = "5.0"
s.swift_version = "5.1"

s.dependency 'RxSwift', '~> 5.0'
s.dependency 'RxCocoa', '~> 5.0'
s.dependency 'RxSwift', '~> 6.0'
s.dependency 'RxCocoa', '~> 6.0'

s.ios.deployment_target = '8.0'
s.ios.deployment_target = '9.0'
end
22 changes: 7 additions & 15 deletions Sources/RxKeyboard/RxKeyboard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,17 +50,10 @@ public class RxKeyboard: NSObject, RxKeyboardType {
// MARK: Initializing

override init() {
#if swift(>=4.2)
let keyboardWillChangeFrame = UIResponder.keyboardWillChangeFrameNotification
let keyboardWillHide = UIResponder.keyboardWillHideNotification
let keyboardFrameEndKey = UIResponder.keyboardFrameEndUserInfoKey
let applicationDidFinishLaunching = UIApplication.didFinishLaunchingNotification
#else
Copy link

Choose a reason for hiding this comment

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

Is this change intentional? Why should we drop support for versions lower than 4.2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In .podspec and package.swift files swift 5.0 is listed as minimal supported version, isn't it?

let keyboardWillChangeFrame = NSNotification.Name.UIKeyboardWillChangeFrame
let keyboardWillHide = NSNotification.Name.UIKeyboardWillHide
let keyboardFrameEndKey = UIKeyboardFrameEndUserInfoKey
let applicationDidFinishLaunching = NSNotification.Name.UIApplicationDidFinishLaunching
#endif

let keyboardWillChangeFrame = UIResponder.keyboardWillChangeFrameNotification
let keyboardWillHide = UIResponder.keyboardWillHideNotification
let keyboardFrameEndKey = UIResponder.keyboardFrameEndUserInfoKey

let defaultFrame = CGRect(
x: 0,
Expand Down Expand Up @@ -131,9 +124,8 @@ public class RxKeyboard: NSObject, RxKeyboardType {

// gesture recognizer
self.panRecognizer.delegate = self
NotificationCenter.default.rx.notification(applicationDidFinishLaunching)
.map { _ in Void() }
.startWith(Void()) // when RxKeyboard is initialized before UIApplication.window is created

UIApplication.rx.didFinishLaunching // when RxKeyboard is initialized before UIApplication.window is created
.subscribe(onNext: { _ in
UIApplication.shared.windows.first?.addGestureRecognizer(self.panRecognizer)
})
Expand Down Expand Up @@ -167,7 +159,7 @@ extension RxKeyboard: UIGestureRecognizerDelegate {
_ gestureRecognizer: UIGestureRecognizer,
shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer
) -> Bool {
return gestureRecognizer === self.panRecognizer
gestureRecognizer === self.panRecognizer
}

}
Expand Down
Loading