diff --git a/Action.podspec b/Action.podspec index 61b13427..1b0058ea 100644 --- a/Action.podspec +++ b/Action.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Action" - s.version = "3.6.0" + s.version = "3.7.0" s.summary = "Abstracts actions to be performed in RxSwift." s.description = <<-DESC Encapsulates an action to be performed, usually by a button press, but also useful to pass actions to execute later @@ -20,8 +20,8 @@ Pod::Spec.new do |s| s.source_files = "Sources/**/*.{swift}" s.frameworks = "Foundation" - s.dependency "RxSwift", "~> 4.2.0" - s.dependency "RxCocoa", "~> 4.2.0" + s.dependency "RxSwift", "~> 4.3.0" + s.dependency "RxCocoa", "~> 4.3.0" s.watchos.exclude_files = "Control+Action.swift", "Button+Action.swift", "UIBarButtonItem+Action.swift", "UIAlertAction+Action.swift" s.osx.exclude_files = "UIBarButtonItem+Action.swift", "UIAlertAction+Action.swift" diff --git a/Action.xcodeproj/project.pbxproj b/Action.xcodeproj/project.pbxproj index 69eb4cec..83716588 100644 --- a/Action.xcodeproj/project.pbxproj +++ b/Action.xcodeproj/project.pbxproj @@ -598,7 +598,7 @@ }; 7F5E6A661D7F08D2000B6076 = { CreatedOnToolsVersion = 8.0; - LastSwiftMigration = 0810; + LastSwiftMigration = 1000; ProvisioningStyle = Automatic; }; 7F612ACB1D7F13B800B93BC5 = { @@ -607,7 +607,7 @@ }; BE73AD1F1CDCD101006F8B98 = { CreatedOnToolsVersion = 7.3; - LastSwiftMigration = 0800; + LastSwiftMigration = 1000; }; }; }; @@ -834,6 +834,7 @@ SDKROOT = appletvos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -860,6 +861,7 @@ PRODUCT_NAME = Action; SDKROOT = appletvos; SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; }; @@ -892,6 +894,7 @@ SDKROOT = macosx; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -921,6 +924,7 @@ PROVISIONING_PROFILE_SPECIFIER = ""; SDKROOT = macosx; SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -947,6 +951,7 @@ SDKROOT = watchos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -974,6 +979,7 @@ PRODUCT_NAME = Action; SDKROOT = watchos; SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; TARGETED_DEVICE_FAMILY = 4; WATCHOS_DEPLOYMENT_TARGET = 2.0; }; @@ -1050,7 +1056,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "-.Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -1067,6 +1073,7 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "-.Tests"; PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 4.2; }; name = Release; }; @@ -1235,6 +1242,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.2; }; name = Debug; }; @@ -1257,6 +1265,7 @@ PRODUCT_BUNDLE_IDENTIFIER = com.ashfurrow.Action; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_VERSION = 4.2; }; name = Release; }; diff --git a/Cartfile b/Cartfile index 12c2ee5f..452d8ee7 100644 --- a/Cartfile +++ b/Cartfile @@ -1 +1 @@ -github "ReactiveX/RxSwift" ~> 4.2.0 +github "ReactiveX/RxSwift" ~> 4.3.0 diff --git a/Changelog.md b/Changelog.md index 75184882..90c7db67 100644 --- a/Changelog.md +++ b/Changelog.md @@ -5,12 +5,17 @@ Current master -------------- - Fix build failure on New Build System (default on Xcode 10) [#151](https://github.com/RxSwiftCommunity/Action/pull/151) +3.7.0 +----- +- Added full support for Swift 4.2 +- Added full support for RxSwift 4.3 + 3.6.0 ----- - Updated `Semantic Versioning` to reflect what is actaully released both on `Pod` and `Carthage` - Added full support for Swift 4.1 - Added full support for RxSwift 4.2.0 -- UIRefreshControl support: binding to an action (or CocoaAction) starts the action itself and updates the control's refreshing status +- UIRefreshControl support: binding to an action (or CocoaAction) starts the action itself and updates the control's refreshing status 3.5.0 ----- @@ -135,7 +140,7 @@ Added `UIAlertAction` support. 0.2.1 ----- -- Fixes `enabledIf:` parameter to be `Observable`, `where B: BooleanType`. +- Fixes `enabledIf:` parameter to be `Observable`, `where B: BooleanType`. 0.2.0 ----- diff --git a/Sources/Action/UIKitExtensions/UIAlertAction+Action.swift b/Sources/Action/UIKitExtensions/UIAlertAction+Action.swift index 9107bf7d..5b4cea0e 100644 --- a/Sources/Action/UIKitExtensions/UIAlertAction+Action.swift +++ b/Sources/Action/UIKitExtensions/UIAlertAction+Action.swift @@ -3,9 +3,15 @@ import UIKit import RxSwift import RxCocoa -public extension UIAlertAction { +#if swift(>=4.2) +public typealias ActionStyle = UIAlertAction.Style +#else +public typealias ActionStyle = UIAlertActionStyle +#endif - public static func Action(_ title: String?, style: UIAlertActionStyle) -> UIAlertAction { +public extension UIAlertAction { + + public static func Action(_ title: String?, style: ActionStyle) -> UIAlertAction { return UIAlertAction(title: title, style: style, handler: { action in action.rx.action?.execute(()) return