Skip to content

Commit

Permalink
Bump Minimums OSes to suppress Xcode 14 warnings (#865)
Browse files Browse the repository at this point in the history
This updates all deployment target minimums to the values supported by Xcode 14.
It removes spurious warnings of the form:

```
The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99.
```
  • Loading branch information
lickel committed Dec 20, 2022
1 parent 509916c commit f3fc99a
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 75 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# master
*Please add new entries at the top.*

1. Bumped deployment target to iOS 11, tvOS 11, watchOS 4, macOS 10.13, per Xcode 14 warnings

# 7.1.0
1. Add CI Release jobs on tag push (#862, kudos to @p4checo)
1. Fix some issues related to locking, bumped min OS versions to iOS 10, macOS 10.12, tvOS 10, watchOS 3 (#859, kudos to @mluisbrown)
Expand Down
2 changes: 1 addition & 1 deletion Documentation/RxCheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Inspired by the [RxSwift to Combine cheatsheet](https://github.com/CombineCommun

| | RxSwift | ReactiveSwift |
|-----------------------|----------------------------------|--------------------------------------------|
| Deployment Target | iOS 8.0+ | iOS 9.0+
| Deployment Target | iOS 9.0+ | iOS 11.0+
| Platforms supported | iOS, macOS, tvOS, watchOS, Linux | iOS, macOS, tvOS, watchOS, Linux
| Spec | Reactive Extensions (ReactiveX) | Originally ReactiveX, with significant divergence
| Framework Consumption | Third-party | Third-party
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PackageDescription
let package = Package(
name: "ReactiveSwift",
platforms: [
.macOS(.v10_12), .iOS(.v10), .tvOS(.v10), .watchOS(.v3)
.macOS(.v10_13), .iOS(.v11), .tvOS(.v11), .watchOS(.v4)
],
products: [
.library(name: "ReactiveSwift", targets: ["ReactiveSwift"]),
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ code and state to bridge the gap.

## Installation

ReactiveSwift supports macOS 10.9+, iOS 9.0+, watchOS 2.0+, tvOS 9.0+ and Linux.
ReactiveSwift supports macOS 10.13+, iOS 11.0+, watchOS 4.0+, tvOS 11.0+ and Linux.

#### Carthage

Expand Down
7 changes: 4 additions & 3 deletions ReactiveSwift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ Pod::Spec.new do |s|
s.author = "ReactiveCocoa"

s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.watchos.deployment_target = "3.0"
s.tvos.deployment_target = "10.0"
s.osx.deployment_target = "10.13"
s.watchos.deployment_target = "4.0"
s.tvos.deployment_target = "11.0"

s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveSwift.git", :tag => "#{s.version}" }
# Directory glob for all Swift files
s.source_files = ["Sources/*.{swift}", "Sources/**/*.{swift}"]
Expand Down
1 change: 0 additions & 1 deletion Sources/Scheduler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ public final class QueueScheduler: DateScheduler {
/// - name: A name for the queue in the form of reverse domain.
/// - targeting: (Optional) The queue on which this scheduler's work is
/// targeted
@available(OSX 10.10, *)
public convenience init(
qos: DispatchQoS = .default,
name: String = "org.reactivecocoa.ReactiveSwift.QueueScheduler",
Expand Down
32 changes: 15 additions & 17 deletions Tests/ReactiveSwiftTests/ActionSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -186,24 +186,22 @@ class ActionSpec: QuickSpec {
action1.apply().start()
}

if #available(macOS 10.10, *) {
it("should not loop indefinitely") {
let condition = MutableProperty(1)

let action = Action<Void, Void, Never>(state: condition, enabledIf: { $0 == 0 }) { _, _ in
return .empty
}

var count = 0

action.isExecuting.producer
.startWithValues { _ in
condition.value = 10

count += 1
expect(count) == 1
}
it("should not loop indefinitely") {
let condition = MutableProperty(1)

let action = Action<Void, Void, Never>(state: condition, enabledIf: { $0 == 0 }) { _, _ in
return .empty
}

var count = 0

action.isExecuting.producer
.startWithValues { _ in
condition.value = 10

count += 1
expect(count) == 1
}
}

describe("completed") {
Expand Down
9 changes: 1 addition & 8 deletions Tests/ReactiveSwiftTests/PropertySpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,7 @@ class PropertySpec: QuickSpec {
}

it("should not deadlock") {
let queue: DispatchQueue

if #available(macOS 10.10, *) {
queue = DispatchQueue.global(qos: .userInteractive)
} else {
queue = DispatchQueue.global(priority: .high)
}

let queue = DispatchQueue.global(qos: .userInteractive)
let setup = DispatchGroup()
let workers = DispatchGroup()

Expand Down
8 changes: 0 additions & 8 deletions Tests/ReactiveSwiftTests/QueueScheduler+Factory.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@ extension QueueScheduler {
let file = URL(string: file)?.lastPathComponent ?? "<unknown>"
let label = "reactiveswift:\(file):\(line)"

#if targetEnvironment(macCatalyst)
return QueueScheduler(name: label)
#else
if #available(OSX 10.10, iOS 8.0, *) {
return QueueScheduler(name: label)
} else {
return QueueScheduler()
}
#endif
}
}
8 changes: 1 addition & 7 deletions Tests/ReactiveSwiftTests/SchedulerSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,7 @@ class SchedulerSpec: QuickSpec {
describe("UIScheduler") {
func dispatchSyncInBackground(_ action: @escaping () -> Void) {
let group = DispatchGroup()

let globalQueue: DispatchQueue
if #available(*, OSX 10.10) {
globalQueue = DispatchQueue.global()
} else {
globalQueue = DispatchQueue.global(priority: .default)
}
let globalQueue = DispatchQueue.global()

globalQueue.async(group: group, execute: action)
group.wait()
Expand Down
16 changes: 2 additions & 14 deletions Tests/ReactiveSwiftTests/SignalProducerSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3087,13 +3087,7 @@ class SignalProducerSpec: QuickSpec {
var result: Result<Int, Never>?

let group = DispatchGroup()

let globalQueue: DispatchQueue
if #available(*, OSX 10.10) {
globalQueue = DispatchQueue.global()
} else {
globalQueue = DispatchQueue.global(priority: .default)
}
let globalQueue = DispatchQueue.global()

globalQueue.async(group: group, flags: []) {
result = producer.last()
Expand Down Expand Up @@ -3135,13 +3129,7 @@ class SignalProducerSpec: QuickSpec {
var result: Result<(), Never>?

let group = DispatchGroup()

let globalQueue: DispatchQueue
if #available(*, OSX 10.10) {
globalQueue = DispatchQueue.global()
} else {
globalQueue = DispatchQueue.global(priority: .default)
}
let globalQueue = DispatchQueue.global()

globalQueue.async(group: group, flags: []) {
result = producer.wait()
Expand Down
16 changes: 2 additions & 14 deletions Tests/ReactiveSwiftTests/SignalSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,7 @@ class SignalSpec: QuickSpec {

describe("interruption") {
it("should not send events after sending an interrupted event") {
let queue: DispatchQueue

if #available(macOS 10.10, *) {
queue = DispatchQueue.global(qos: .userInitiated)
} else {
queue = DispatchQueue.global(priority: .high)
}
let queue = DispatchQueue.global(qos: .userInitiated)

let (signal, observer) = Signal<Int, Never>.pipe()

Expand Down Expand Up @@ -362,16 +356,10 @@ class SignalSpec: QuickSpec {
}

it("should interrupt concurrently") {
let queue: DispatchQueue
let queue = DispatchQueue.global(qos: .userInitiated)
let counter = Atomic<Int>(0)
let executionCounter = Atomic<Int>(0)

if #available(macOS 10.10, *) {
queue = DispatchQueue.global(qos: .userInitiated)
} else {
queue = DispatchQueue.global(priority: .high)
}

let iterations = 1000
let group = DispatchGroup()

Expand Down

0 comments on commit f3fc99a

Please sign in to comment.