File tree Expand file tree Collapse file tree 2 files changed +1
-26
lines changed
ParseSwift.playground/Pages
4 - User - Continued.xcplaygroundpage
6 - Installation.xcplaygroundpage Expand file tree Collapse file tree 2 files changed +1
-26
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ User.current?.save { results in
59
59
60
60
switch results {
61
61
case . success( let updatedUser) :
62
- print ( " Successfully save myCustomKey and score to ParseServer: \( updatedUser) " )
62
+ print ( " Successfully save custom fields of User to ParseServer: \( updatedUser) " )
63
63
case . failure( let error) :
64
64
print ( " Failed to update user: \( error) " )
65
65
}
Original file line number Diff line number Diff line change @@ -29,29 +29,6 @@ struct Installation: ParseInstallation {
29
29
30
30
//: Your custom keys
31
31
var customKey : String ?
32
- var score : GameScore ?
33
- var targetScore : GameScore ?
34
- }
35
-
36
- //: Create your own value typed `ParseObject`.
37
- struct GameScore : ParseObject {
38
- //: Those are required for Object
39
- var objectId : String ?
40
- var createdAt : Date ?
41
- var updatedAt : Date ?
42
- var ACL : ParseACL ?
43
-
44
- //: Your own properties.
45
- var score : Int ? = 0
46
-
47
- //: Custom initializer.
48
- init ( score: Int ) {
49
- self . score = score
50
- }
51
-
52
- init ( objectId: String ? ) {
53
- self . objectId = objectId
54
- }
55
32
}
56
33
57
34
//: WARNING: All calls on Installation need to be done on the main queue
@@ -63,8 +40,6 @@ DispatchQueue.main.async {
63
40
returns to main queue.
64
41
*/
65
42
Installation . current? . customKey = " myCustomInstallationKey2 "
66
- Installation . current? . score = GameScore ( score: 12 )
67
- Installation . current? . targetScore = GameScore ( score: 100 )
68
43
Installation . current? . save { results in
69
44
70
45
switch results {
You can’t perform that action at this time.
0 commit comments