Skip to content

Commit db391a4

Browse files
authored
Update keychains of ParseUser and ParseInstallation (#38)
* Update keychains of ParseUser and ParseInstallation during: fetch, fetchAll, delete, deleteAll * Drop codecov due to added code * use carthage script to build using Xcode12 * Update ci.yml * Add default callbackQueue to queries * Gain back some codecov by adding more tests. Cleaned up some code and comments * Bump codecov * Add test case for delete ParseUser. * Reduce to return try * Fix some spacing
1 parent e2dde15 commit db391a4

File tree

20 files changed

+1889
-134
lines changed

20 files changed

+1889
-134
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ coverage:
99
changes: false
1010
project:
1111
default:
12-
target: 71
12+
target: 72
1313
comment:
1414
require_changes: true

.github/workflows/ci.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,4 @@ jobs:
107107
steps:
108108
- uses: actions/checkout@v2
109109
- name: Carthage
110-
run: carthage build --no-skip-current
111-
env:
112-
DEVELOPER_DIR: ${{ env.CI_XCODE_VER }}
110+
run: ./carthage.sh build --no-skip-current

ParseSwift.playground/Pages/2 - Finding Objects.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ results.forEach { (score) in
5252
// Query first asynchronously (preferred way) - Performs work on background
5353
// queue and returns to designated on designated callbackQueue.
5454
// If no callbackQueue is specified it returns to main queue
55-
query.first(callbackQueue: .main) { results in
55+
query.first { results in
5656
switch results {
5757
case .success(let score):
5858

ParseSwift.playground/Pages/3 - User - Sign Up.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ User.signup(username: "hello", password: "world") { results in
4040
if !currentUser.hasSameObjectId(as: user) {
4141
assertionFailure("Error: these two objects should match")
4242
} else {
43-
print("Succesfully signed up user \(user)")
43+
print("Successfully signed up user \(user)")
4444
}
4545

4646
case .failure(let error):

ParseSwift.playground/Pages/4 - User - Continued.xcplaygroundpage/Contents.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ User.current?.save { results in
3333

3434
switch results {
3535
case .success(let updatedUser):
36-
print("Succesufully save myCustomKey to ParseServer: \(updatedUser)")
36+
print("Successfully save myCustomKey to ParseServer: \(updatedUser)")
3737
case .failure(let error):
3838
assertionFailure("Failed to update user: \(error)")
3939
}
@@ -42,7 +42,7 @@ User.current?.save { results in
4242
//: Logging out - synchronously
4343
do {
4444
try User.logout()
45-
print("Succesfully logged out")
45+
print("Successfully logged out")
4646
} catch let error {
4747
assertionFailure("Error logging out: \(error)")
4848
}
@@ -61,7 +61,7 @@ User.login(username: "hello", password: "world") { results in
6161
return
6262
}
6363
assert(currentUser.hasSameObjectId(as: user))
64-
print("Succesfully logged in as user: \(user)")
64+
print("Successfully logged in as user: \(user)")
6565

6666
case .failure(let error):
6767
assertionFailure("Error logging in: \(error)")
@@ -71,7 +71,7 @@ User.login(username: "hello", password: "world") { results in
7171
//: Logging out - synchronously
7272
do {
7373
try User.logout()
74-
print("Succesfully logged out")
74+
print("Successfully logged out")
7575
} catch let error {
7676
assertionFailure("Error logging out: \(error)")
7777
}

ParseSwift.playground/Pages/6 - Installation.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ DispatchQueue.main.async {
4444

4545
switch results {
4646
case .success(let updatedInstallation):
47-
print("Succesufully save myCustomInstallationKey to ParseServer: \(updatedInstallation)")
47+
print("Successfully save myCustomInstallationKey to ParseServer: \(updatedInstallation)")
4848
case .failure(let error):
4949
assertionFailure("Failed to update installation: \(error)")
5050
}

ParseSwift.playground/Pages/7 - GeoPoint.xcplaygroundpage/Contents.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ var constraints = [QueryConstraint]()
6161
constraints.append(near(key: "location", geoPoint: pointToFind))
6262

6363
let query = GameScore.query(constraints)
64-
query.find(callbackQueue: .main) { results in
64+
query.find { results in
6565
switch results {
6666
case .success(let scores):
6767

@@ -80,7 +80,7 @@ Notice the "var", the query has to be mutable since it's a valueType.
8080
*/
8181
var querySorted = query
8282
querySorted.order([.descending("score")])
83-
querySorted.find(callbackQueue: .main) { results in
83+
querySorted.find { results in
8484
switch results {
8585
case .success(let scores):
8686

@@ -97,7 +97,7 @@ querySorted.find(callbackQueue: .main) { results in
9797
//: If you only want to query for scores > 50, you can add more constraints
9898
constraints.append("score" > 9)
9999
var query2 = GameScore.query(constraints)
100-
query2.find(callbackQueue: .main) { results in
100+
query2.find { results in
101101
switch results {
102102
case .success(let scores):
103103

@@ -116,7 +116,7 @@ query2.find(callbackQueue: .main) { results in
116116

117117
//: If you want to query for scores > 50 and don't have a GeoPoint
118118
var query3 = GameScore.query("score" > 50, doesNotExist(key: "location"))
119-
query3.find(callbackQueue: .main) { results in
119+
query3.find { results in
120120
switch results {
121121
case .success(let scores):
122122

@@ -134,7 +134,7 @@ query3.find(callbackQueue: .main) { results in
134134

135135
//: If you want to query for scores > 50 and have a GeoPoint
136136
var query4 = GameScore.query("score" > 10, exists(key: "location"))
137-
query4.find(callbackQueue: .main) { results in
137+
query4.find { results in
138138
switch results {
139139
case .success(let scores):
140140

@@ -154,7 +154,7 @@ let query5 = GameScore.query("score" == 50)
154154
let query6 = GameScore.query("score" == 200)
155155

156156
var query7 = GameScore.query(or(queries: [query5, query6]))
157-
query7.find(callbackQueue: .main) { results in
157+
query7.find { results in
158158
switch results {
159159
case .success(let scores):
160160

0 commit comments

Comments
 (0)