3
3
4
4
[ ![ Travis CI] ( https://travis-ci.org/ReactiveX/RxSwift.svg?branch=master )] ( https://travis-ci.org/ReactiveX/RxSwift ) ![ platforms] ( https://img.shields.io/badge/platforms-iOS%20%7C%20macOS%20%7C%20tvOS%20%7C%20watchOS%20%7C%20Linux-333333.svg ) ![ pod] ( https://img.shields.io/cocoapods/v/RxSwift.svg ) [ ![ Carthage compatible] ( https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat )] ( https://github.com/Carthage/Carthage ) [ ![ Swift Package Manager compatible] ( https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg )] ( https://github.com/apple/swift-package-manager )
5
5
6
- * RxSwift 4.x / Swift 4.x can be found in [ ** rxswift4.0-swift4.0** branch] ( https://github.com/ReactiveX/RxSwift/tree/rxswift4.0-swift4.0 ) .
7
- * RxSwift 3.x / Swift 3.x can be found in [ ** master** branch] ( https://github.com/ReactiveX/RxSwift/tree/master ) .
6
+ * RxSwift 3.x / Swift 3.x can be found in [ ** rxswift-3.0** branch] ( https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0 ) .
8
7
9
8
Rx is a [ generic abstraction of computation] ( https://youtu.be/looJcaeboBY ) expressed through ` Observable<Element> ` interface.
10
9
@@ -105,8 +104,9 @@ searchResults
105
104
106
105
## Requirements
107
106
108
- * Xcode 8.0
109
- * Swift 3.0
107
+ * Xcode 9.0
108
+ * Swift 4.0
109
+ * Swift 3.x ([ use ` rxswift-3.0 ` branch] ( https://github.com/ReactiveX/RxSwift/tree/rxswift-3.0 ) instead)
110
110
* Swift 2.3 ([ use ` rxswift-2.0 ` branch] ( https://github.com/ReactiveX/RxSwift/tree/rxswift-2.0 ) instead)
111
111
112
112
## Installation
@@ -121,21 +121,21 @@ Open Rx.xcworkspace, choose `RxExample` and hit run. This method will build ever
121
121
122
122
### [ CocoaPods] ( https://guides.cocoapods.org/using/using-cocoapods.html )
123
123
124
- ** Tested with ` pod --version ` : ` 1.1 .1 ` **
124
+ ** Tested with ` pod --version ` : ` 1.3 .1 ` **
125
125
126
126
``` ruby
127
127
# Podfile
128
128
use_frameworks!
129
129
130
130
target ' YOUR_TARGET_NAME' do
131
- pod ' RxSwift' , ' ~> 3 .0'
132
- pod ' RxCocoa' , ' ~> 3 .0'
131
+ pod ' RxSwift' , ' ~> 4 .0'
132
+ pod ' RxCocoa' , ' ~> 4 .0'
133
133
end
134
134
135
135
# RxTests and RxBlocking make the most sense in the context of unit/integration tests
136
136
target ' YOUR_TESTING_TARGET' do
137
- pod ' RxBlocking' , ' ~> 3 .0'
138
- pod ' RxTest' , ' ~> 3 .0'
137
+ pod ' RxBlocking' , ' ~> 4 .0'
138
+ pod ' RxTest' , ' ~> 4 .0'
139
139
end
140
140
```
141
141
@@ -147,12 +147,12 @@ $ pod install
147
147
148
148
### [ Carthage] ( https://github.com/Carthage/Carthage )
149
149
150
- ** Tested with ` carthage version ` : ` 0.18.1 ` **
150
+ ** Tested with ` carthage version ` : ` 0.26.2 ` **
151
151
152
152
Add this to ` Cartfile `
153
153
154
154
```
155
- github "ReactiveX/RxSwift" ~> 3 .0
155
+ github "ReactiveX/RxSwift" ~> 4 .0
156
156
```
157
157
158
158
``` bash
@@ -161,19 +161,23 @@ $ carthage update
161
161
162
162
### [ Swift Package Manager] ( https://github.com/apple/swift-package-manager )
163
163
164
- ** Tested with ` swift build --version ` : ` 3 .0.0 (swiftpm-19 )` **
164
+ ** Tested with ` swift build --version ` : ` Swift 4 .0.0-dev (swiftpm-13126 )` **
165
165
166
166
Create a ` Package.swift ` file.
167
167
168
168
``` swift
169
+ // swift-tools-version:4.0
170
+
169
171
import PackageDescription
170
172
171
173
let package = Package (
172
- name : " RxTestProject" ,
173
- targets : [],
174
- dependencies : [
175
- .Package (url : " https://github.com/ReactiveX/RxSwift.git" , majorVersion : 3 )
176
- ]
174
+ name : " RxTestProject" ,
175
+ dependencies : [
176
+ .package (url : " https://github.com/ReactiveX/RxSwift.git" , " 4.0.0" ..< " 5.0.0" )
177
+ ],
178
+ targets : [
179
+ .target (name : " RxTestProject" , dependencies : [" RxSwift" , " RxCocoa" ])
180
+ ]
177
181
)
178
182
```
179
183
0 commit comments