Skip to content

Commit a99bf31

Browse files
authored
Batch child objects using transactions (#94)
* Batch child objects using transactions * codecov * clean up * nit * Add changelog * nits * Fixed bug linking anonymous user * prepare for release * remove old child object code * Update .codecov.yml
1 parent 82cbecd commit a99bf31

25 files changed

+308
-363
lines changed

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ coverage:
55
status:
66
patch:
77
default:
8-
target: 72
8+
target: 77
99
changes: false
1010
project:
1111
default:

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Parse-Swift Changelog
22

33
### main
4-
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.2.0...main)
4+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.2.1...main)
55
* _Contributing to this repo? Add info about your change here to be included in the next release_
66

7+
### 1.2.1
8+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.2.0...1.2.1)
9+
10+
__Improvements__
11+
- Child objects are now automatically saved in batches using transactions. This will result in less network overhead and prevent uneccessary clean up of data on the server if a child objects throws an error while saving ([#94](https://github.com/parse-community/Parse-Swift/pull/94)), thanks to [Corey Baker](https://github.com/cbaker6).
12+
13+
__Fixes__
14+
- There was a bug after a user first logs in anonymously and then becomes a real user as the server sends a new sessionToken when this occurs, but the SDK used the old sessionToken, resulting in an invalid sessionToken error ([#94](https://github.com/parse-community/Parse-Swift/pull/94)), thanks to [Corey Baker](https://github.com/cbaker6).
15+
716
### 1.2.0
817
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.1.6...1.2.0)
918

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

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,28 @@ do {
131131
print("Error logging out: \(error)")
132132
}
133133

134+
//: Password Reset Request - synchronously.
135+
do {
136+
try User.verificationEmail(email: "[email protected]")
137+
print("Successfully requested verification email be sent")
138+
} catch let error {
139+
print("Error requesting verification email be sent: \(error)")
140+
}
141+
142+
//: Password Reset Request - synchronously.
143+
do {
144+
try User.passwordReset(email: "[email protected]")
145+
print("Successfully requested password reset")
146+
} catch let error {
147+
print("Error requesting password reset: \(error)")
148+
}
149+
134150
//: Logging in anonymously.
135151
User.anonymous.login { result in
136152
switch result {
137153
case .success:
138154
print("Successfully logged in \(String(describing: User.current))")
155+
print("Session token: \(String(describing: User.current?.sessionToken))")
139156
case .failure(let error):
140157
print("Error logging in: \(error)")
141158
}
@@ -149,36 +166,12 @@ User.current?.signup { result in
149166

150167
case .success(let user):
151168
print("Parse signup successful: \(user)")
152-
169+
print("Session token: \(String(describing: User.current?.sessionToken))")
153170
case .failure(let error):
154171
print("Error logging in: \(error)")
155172
}
156173
}
157174

158-
//: Logging out - synchronously.
159-
do {
160-
try User.logout()
161-
print("Successfully logged out")
162-
} catch let error {
163-
print("Error logging out: \(error)")
164-
}
165-
166-
//: Password Reset Request - synchronously.
167-
do {
168-
try User.verificationEmail(email: "[email protected]")
169-
print("Successfully requested verification email be sent")
170-
} catch let error {
171-
print("Error requesting verification email be sent: \(error)")
172-
}
173-
174-
//: Password Reset Request - synchronously.
175-
do {
176-
try User.passwordReset(email: "[email protected]")
177-
print("Successfully requested password reset")
178-
} catch let error {
179-
print("Error requesting password reset: \(error)")
180-
}
181-
182175
PlaygroundPage.current.finishExecution()
183176

184177
//: [Next](@next)

ParseSwift.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "ParseSwift"
3-
s.version = "1.2.0"
3+
s.version = "1.2.1"
44
s.summary = "Parse Pure Swift SDK"
55
s.homepage = "https://github.com/parse-community/Parse-Swift"
66
s.authors = {

ParseSwift.xcodeproj/project.pbxproj

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2261,7 +2261,7 @@
22612261
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
22622262
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
22632263
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2264-
MARKETING_VERSION = 1.1.7;
2264+
MARKETING_VERSION = 1.2.1;
22652265
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
22662266
PRODUCT_NAME = ParseSwift;
22672267
SKIP_INSTALL = YES;
@@ -2285,7 +2285,7 @@
22852285
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
22862286
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
22872287
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2288-
MARKETING_VERSION = 1.1.7;
2288+
MARKETING_VERSION = 1.2.1;
22892289
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
22902290
PRODUCT_NAME = ParseSwift;
22912291
SKIP_INSTALL = YES;
@@ -2351,7 +2351,7 @@
23512351
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
23522352
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
23532353
MACOSX_DEPLOYMENT_TARGET = 10.13;
2354-
MARKETING_VERSION = 1.1.7;
2354+
MARKETING_VERSION = 1.2.1;
23552355
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
23562356
PRODUCT_NAME = ParseSwift;
23572357
SDKROOT = macosx;
@@ -2377,7 +2377,7 @@
23772377
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
23782378
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
23792379
MACOSX_DEPLOYMENT_TARGET = 10.13;
2380-
MARKETING_VERSION = 1.1.7;
2380+
MARKETING_VERSION = 1.2.1;
23812381
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
23822382
PRODUCT_NAME = ParseSwift;
23832383
SDKROOT = macosx;
@@ -2524,7 +2524,7 @@
25242524
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
25252525
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
25262526
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2527-
MARKETING_VERSION = 1.1.7;
2527+
MARKETING_VERSION = 1.2.1;
25282528
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
25292529
MTL_FAST_MATH = YES;
25302530
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-watchOS";
@@ -2553,7 +2553,7 @@
25532553
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
25542554
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
25552555
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2556-
MARKETING_VERSION = 1.1.7;
2556+
MARKETING_VERSION = 1.2.1;
25572557
MTL_FAST_MATH = YES;
25582558
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-watchOS";
25592559
PRODUCT_NAME = ParseSwift;
@@ -2580,7 +2580,7 @@
25802580
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
25812581
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
25822582
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2583-
MARKETING_VERSION = 1.1.7;
2583+
MARKETING_VERSION = 1.2.1;
25842584
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
25852585
MTL_FAST_MATH = YES;
25862586
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-tvOS";
@@ -2608,7 +2608,7 @@
26082608
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
26092609
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
26102610
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2611-
MARKETING_VERSION = 1.1.7;
2611+
MARKETING_VERSION = 1.2.1;
26122612
MTL_FAST_MATH = YES;
26132613
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-tvOS";
26142614
PRODUCT_NAME = ParseSwift;

Scripts/jazzy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ bundle exec jazzy \
55
--author_url http://parseplatform.org \
66
--github_url https://github.com/parse-community/Parse-Swift \
77
--root-url http://parseplatform.org/Parse-Swift/api/ \
8-
--module-version 1.2.0 \
8+
--module-version 1.2.1 \
99
--theme fullwidth \
1010
--skip-undocumented \
1111
--output ./docs/api \

0 commit comments

Comments
 (0)