Skip to content

Commit 92bd001

Browse files
authored
Merge branch 'main' into add-migration-guide
2 parents 5306622 + 48bec30 commit 92bd001

File tree

113 files changed

+5018
-1039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+5018
-1039
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ coverage:
66
status:
77
patch:
88
default:
9-
target: 33
9+
target: auto
1010
changes: false
1111
project:
1212
default:

.swiftlint.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ disabled_rules:
55
- type_body_length
66
- inclusive_language
77
- comment_spacing
8+
- identifier_name
89
excluded: # paths to ignore during linting. Takes precedence over `included`.
910
- Tests/ParseSwiftTests/ParseEncoderTests
1011
- DerivedData

CHANGELOG.md

Lines changed: 45 additions & 15 deletions
Large diffs are not rendered by default.

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Together we will plan out the best conceptual approach for your contribution, so
2727

2828
When you are ready to code, you can find more information about opening a pull request in the [GitHub docs](https://help.github.com/articles/creating-a-pull-request/).
2929

30-
Whether this is your first contribution or you are already an experienced contributor, the Parse Community has your back – don't hesitate to ask for help!
30+
Whether this is your first contribution or you are already an experienced contributor, the Parse Community has your back – do not hesitate to ask for help!
3131

3232
## Why Contributing?
3333

ParseSwift.playground/Pages/1 - Your first Object.xcplaygroundpage/Contents.swift

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ score.save { result in
121121
assert(savedScore.points == 10)
122122

123123
/*: To modify, need to make it a var as the value type
124-
was initialized as immutable. Using `mutable`
124+
was initialized as immutable. Using `mergeable`
125125
allows you to only send the updated keys to the
126126
parse server as opposed to the whole object.
127127
*/
@@ -195,7 +195,7 @@ var score2ForFetchedLater: GameScore?
195195
}
196196
}*/
197197

198-
//: Save synchronously (not preferred - all operations on main queue).
198+
//: Save synchronously (not preferred - all operations on current queue).
199199
let savedScore: GameScore?
200200
do {
201201
savedScore = try score.save()
@@ -211,7 +211,7 @@ assert(savedScore?.updatedAt != nil)
211211
assert(savedScore?.points == 10)
212212

213213
/*: To modify, need to make it a var as the value type
214-
was initialized as immutable. Using `mutable`
214+
was initialized as immutable. Using `mergeable`
215215
allows you to only send the updated keys to the
216216
parse server as opposed to the whole object.
217217
*/
@@ -274,7 +274,7 @@ do {
274274
//: Now we will fetch a ParseObject that has already been saved based on its' objectId.
275275
let scoreToFetch = GameScore(objectId: savedScore?.objectId)
276276

277-
//: Asynchronously (preferred way) fetch this GameScore based on it's objectId alone.
277+
//: Asynchronously (preferred way) fetch this GameScore based on it is objectId alone.
278278
scoreToFetch.fetch { result in
279279
switch result {
280280
case .success(let fetchedScore):
@@ -284,7 +284,7 @@ scoreToFetch.fetch { result in
284284
}
285285
}
286286

287-
//: Synchronously fetch this GameScore based on it's objectId alone.
287+
//: Synchronously fetch this GameScore based on it is objectId alone.
288288
do {
289289
let fetchedScore = try scoreToFetch.fetch()
290290
print("Successfully fetched: \(fetchedScore)")
@@ -295,7 +295,7 @@ do {
295295
//: Now we will fetch `ParseObject`'s in batch that have already been saved based on its' objectId.
296296
let score2ToFetch = GameScore(objectId: score2ForFetchedLater?.objectId)
297297

298-
//: Asynchronously (preferred way) fetch GameScores based on it's objectId alone.
298+
//: Asynchronously (preferred way) fetch GameScores based on it is objectId alone.
299299
[scoreToFetch, score2ToFetch].fetchAll { result in
300300
switch result {
301301
case .success(let fetchedScores):
@@ -315,7 +315,7 @@ let score2ToFetch = GameScore(objectId: score2ForFetchedLater?.objectId)
315315

316316
var fetchedScore: GameScore!
317317

318-
//: Synchronously fetchAll GameScore's based on it's objectId's alone.
318+
//: Synchronously fetchAll GameScore's based on it is objectId's alone.
319319
do {
320320
let fetchedScores = try [scoreToFetch, score2ToFetch].fetchAll()
321321
fetchedScores.forEach { result in
@@ -331,7 +331,7 @@ do {
331331
assertionFailure("Error fetching: \(error)")
332332
}
333333

334-
//: Asynchronously (preferred way) deleteAll GameScores based on it's objectId alone.
334+
//: Asynchronously (preferred way) deleteAll GameScores based on it is objectId alone.
335335
[scoreToFetch, score2ToFetch].deleteAll { result in
336336
switch result {
337337
case .success(let deletedScores):
@@ -348,7 +348,7 @@ do {
348348
}
349349
}
350350

351-
//: Synchronously deleteAll GameScore's based on it's objectId's alone.
351+
//: Synchronously deleteAll GameScore's based on it is objectId's alone.
352352
//: Commented out because the async above deletes the items already.
353353
/* do {
354354
let fetchedScores = try [scoreToFetch, score2ToFetch].deleteAll()

ParseSwift.playground/Pages/12 - Roles and Relations.xcplaygroundpage/Contents.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,10 @@ var savedRole: Role<User>?
109109

110110
//: Now we will create the Role.
111111
guard let currentUser = User.current else {
112-
fatalError("User currently isn't signed in")
112+
fatalError("User currently is not signed in")
113113
}
114114

115-
//: Every Role requires an ACL that can't be changed after saving.
115+
//: Every Role requires an ACL that cannot be changed after saving.
116116
var acl = ParseACL()
117117
acl.setReadAccess(user: currentUser, value: true)
118118
acl.setWriteAccess(user: currentUser, value: true)
@@ -312,7 +312,7 @@ let score2 = GameScore(points: 57)
312312
print(error)
313313
}
314314
case .failure(let error):
315-
print("Couldn't save scores. \(error)")
315+
print("Could not save scores. \(error)")
316316
}
317317
}
318318

ParseSwift.playground/Pages/14 - Config.xcplaygroundpage/Contents.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ config.save { result in
5555
}
5656
}
5757

58-
//: Fetch the updated config to make sure it's saved.
58+
//: Fetch the updated config to make sure it is saved.
5959
config.fetch { result in
6060
switch result {
6161
case .success(let currentConfig):
@@ -65,7 +65,7 @@ config.fetch { result in
6565
}
6666
}
6767

68-
//: Anytime you fetch or update your Config successfully, it's automatically saved to your Keychain.
68+
//: Anytime you fetch or update your Config successfully, it is automatically saved to your Keychain.
6969
print(Config.current ?? "No config")
7070

7171
PlaygroundPage.current.finishExecution()

ParseSwift.playground/Pages/15 - Custom ObjectId.xcplaygroundpage/Contents.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ score.save { result in
7575
assert(savedScore.updatedAt != nil)
7676
assert(savedScore.points == 10)
7777

78-
//: Now that this object has a `createdAt`, it's properly saved to the server.
78+
//: Now that this object has a `createdAt`, it is properly saved to the server.
7979
//: Any changes to `createdAt` and `objectId` will not be saved to the server.
8080
print("Saved score: \(savedScore)")
8181

@@ -123,10 +123,10 @@ query.first { result in
123123
}
124124
}
125125

126-
//: Now we will attempt to fetch a ParseObject that isn't saved.
126+
//: Now we will attempt to fetch a ParseObject that is not saved.
127127
let scoreToFetch = GameScore(objectId: "hello")
128128

129-
//: Asynchronously (preferred way) fetch this GameScore based on it's objectId alone.
129+
//: Asynchronously (preferred way) fetch this GameScore based on it is objectId alone.
130130
scoreToFetch.fetch { result in
131131
switch result {
132132
case .success(let fetchedScore):

ParseSwift.playground/Pages/17 - SwiftUI - Finding Objects.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//: For this page, make sure your build target is set to ParseSwift (iOS) and targeting
55
//: an iPhone, iPod, or iPad. Also be sure your `Playground Settings`
66
//: in the `File Inspector` is `Platform = iOS`. This is because
7-
//: SwiftUI in macOS Playgrounds doesn't seem to build correctly
7+
//: SwiftUI in macOS Playgrounds does not seem to build correctly
88
//: Be sure to switch your target and `Playground Settings` back to
99
//: macOS after leaving this page.
1010

ParseSwift.playground/Pages/18 - SwiftUI - Finding Objects With Custom ViewModel.xcplaygroundpage/Contents.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
//: For this page, make sure your build target is set to ParseSwift (iOS) and targeting
55
//: an iPhone, iPod, or iPad. Also be sure your `Playground Settings`
66
//: in the `File Inspector` is `Platform = iOS`. This is because
7-
//: SwiftUI in macOS Playgrounds doesn't seem to build correctly
7+
//: SwiftUI in macOS Playgrounds does not seem to build correctly
88
//: Be sure to switch your target and `Playground Settings` back to
99
//: macOS after leaving this page.
1010

0 commit comments

Comments
 (0)