Skip to content

Commit f043778

Browse files
committed
Removes deprecation warnings.
1 parent ccd32f8 commit f043778

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

RxExample/RxExample/Examples/GitHubSearchRepositories/GitHubSearchRepositoriesAPI.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ extension GitHubSearchRepositoriesAPI {
104104
for m in matches {
105105
let matches = (1 ..< m.numberOfRanges).map { rangeIndex -> String in
106106
let range = m.range(at: rangeIndex)
107-
let startIndex = links.characters.index(links.startIndex, offsetBy: range.location)
108-
let endIndex = links.characters.index(links.startIndex, offsetBy: range.location + range.length)
107+
let startIndex = links.index(links.startIndex, offsetBy: range.location)
108+
let endIndex = links.index(links.startIndex, offsetBy: range.location + range.length)
109109
return String(links[startIndex ..< endIndex])
110110
}
111111

RxExample/RxExample/Examples/GitHubSignup/DefaultImplementations.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ class GitHubDefaultValidationService: GitHubValidationService {
2929
let minPasswordCount = 5
3030

3131
func validateUsername(_ username: String) -> Observable<ValidationResult> {
32-
if username.characters.count == 0 {
32+
if username.isEmpty {
3333
return .just(.empty)
3434
}
35-
3635

3736
// this obviously won't be
3837
if username.rangeOfCharacter(from: CharacterSet.alphanumerics.inverted) != nil {
@@ -55,7 +54,7 @@ class GitHubDefaultValidationService: GitHubValidationService {
5554
}
5655

5756
func validatePassword(_ password: String) -> ValidationResult {
58-
let numberOfCharacters = password.characters.count
57+
let numberOfCharacters = password.count
5958
if numberOfCharacters == 0 {
6059
return .empty
6160
}
@@ -68,7 +67,7 @@ class GitHubDefaultValidationService: GitHubValidationService {
6867
}
6968

7069
func validateRepeatedPassword(_ password: String, repeatedPassword: String) -> ValidationResult {
71-
if repeatedPassword.characters.count == 0 {
70+
if repeatedPassword.count == 0 {
7271
return .empty
7372
}
7473

RxExample/RxExample/Examples/SimpleValidation/SimpleValidationViewController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ class SimpleValidationViewController : ViewController {
3030
passwordValidOutlet.text = "Password has to be at least \(minimalPasswordLength) characters"
3131

3232
let usernameValid = usernameOutlet.rx.text.orEmpty
33-
.map { $0.characters.count >= minimalUsernameLength }
33+
.map { $0.count >= minimalUsernameLength }
3434
.share(replay: 1) // without this map would be executed once for each binding, rx is stateless by default
3535

3636
let passwordValid = passwordOutlet.rx.text.orEmpty
37-
.map { $0.characters.count >= minimalPasswordLength }
37+
.map { $0.count >= minimalPasswordLength }
3838
.share(replay: 1)
3939

4040
let everythingValid = Observable.combineLatest(usernameValid, passwordValid) { $0 && $1 }

RxExample/RxExample/Images.xcassets/AppIcon.appiconset/Contents.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,11 @@
131131
"filename" : "Rx_Logo-iPad.png",
132132
"scale" : "2x"
133133
},
134+
{
135+
"idiom" : "ios-marketing",
136+
"size" : "1024x1024",
137+
"scale" : "1x"
138+
},
134139
{
135140
"size" : "24x24",
136141
"idiom" : "watch",
@@ -186,6 +191,11 @@
186191
"role" : "quickLook",
187192
"subtype" : "42mm"
188193
},
194+
{
195+
"idiom" : "watch-marketing",
196+
"size" : "1024x1024",
197+
"scale" : "1x"
198+
},
189199
{
190200
"idiom" : "mac",
191201
"size" : "16x16",

0 commit comments

Comments
 (0)