Skip to content

Commit 13c2a04

Browse files
cbaker6TomWFox
andauthored
Add emailVerified to ParseUser (#129)
* Add docs to Order enum Missing docs... * Update ParseACL.swift * Improve relative query. Add more documentation * nits * switch codecov * nits * Show simplest version of initializing client in readme. * Add emailVerified to ParseUser * Improve changelog * Don't encode emailVerified as it can't be changed on the client side. * nit * fix changelog * nit Co-authored-by: Tom Fox <[email protected]>
1 parent 99b6196 commit 13c2a04

40 files changed

+182
-57
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: 62
8+
target: auto
99
changes: false
1010
project:
1111
default:

CHANGELOG.md

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

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

7+
### 1.7.0
8+
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.6.0...1.7.0)
9+
10+
__Improvements__
11+
- Add emailVerified to ParseUser. Make relative query take a QueryConstraint as an argument. Add more documentation ([#129](https://github.com/parse-community/Parse-Swift/pull/129)), thanks to [Corey Baker](https://github.com/cbaker6).
12+
713
### 1.6.0
814
[Full Changelog](https://github.com/parse-community/Parse-Swift/compare/1.5.1...1.6.0)
915

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct User: ParseUser {
2323
//: These are required for `ParseUser`.
2424
var username: String?
2525
var email: String?
26+
var emailVerified: Bool?
2627
var password: String?
2728
var authData: [String: [String: String]?]?
2829

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,7 @@ query.first { results in
8585
}
8686

8787
//: Query based on relative time. Have to be using mongoDB.
88-
let queryRelative = GameScore.query(relative(key: "createdAt",
89-
comparator: .lessThan,
90-
time: "10 minutes ago"))
88+
/*let queryRelative = GameScore.query(relative("createdAt" < "10 minutes ago"))
9189
queryRelative.find { results in
9290
switch results {
9391
case .success(let scores):
@@ -98,6 +96,7 @@ queryRelative.find { results in
9896
assertionFailure("Error querying: \(error)")
9997
}
10098
}
99+
*/
101100

102101
let querySelect = query.select("score")
103102
querySelect.first { results in

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ struct User: ParseUser {
2323
//: These are required for `ParseUser`.
2424
var username: String?
2525
var email: String?
26+
var emailVerified: Bool?
2627
var password: String?
2728
var authData: [String: [String: String]?]?
2829

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@ struct User: ParseUser {
2323
//: These are required for `ParseUser`.
2424
var username: String?
2525
var email: String?
26+
var emailVerified: Bool?
2627
var password: String?
2728
var authData: [String: [String: String]?]?
2829

2930
//: Your custom keys.
3031
var customKey: String?
3132
var score: GameScore?
3233
var targetScore: GameScore?
34+
var allScores: [GameScore]?
3335
}
3436

3537
//: Create your own value typed `ParseObject`.
@@ -90,6 +92,7 @@ User.login(username: "hello", password: "world") { results in
9092
User.current?.customKey = "myCustom"
9193
User.current?.score = GameScore(score: 12)
9294
User.current?.targetScore = GameScore(score: 100)
95+
User.current?.allScores = [GameScore(score: 5), GameScore(score: 8)]
9396
User.current?.save { results in
9497

9598
switch results {

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.6.0"
3+
s.version = "1.7.0"
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
@@ -2337,7 +2337,7 @@
23372337
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
23382338
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
23392339
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2340-
MARKETING_VERSION = 1.6.0;
2340+
MARKETING_VERSION = 1.7.0;
23412341
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
23422342
PRODUCT_NAME = ParseSwift;
23432343
SKIP_INSTALL = YES;
@@ -2361,7 +2361,7 @@
23612361
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
23622362
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
23632363
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2364-
MARKETING_VERSION = 1.6.0;
2364+
MARKETING_VERSION = 1.7.0;
23652365
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
23662366
PRODUCT_NAME = ParseSwift;
23672367
SKIP_INSTALL = YES;
@@ -2427,7 +2427,7 @@
24272427
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
24282428
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
24292429
MACOSX_DEPLOYMENT_TARGET = 10.13;
2430-
MARKETING_VERSION = 1.6.0;
2430+
MARKETING_VERSION = 1.7.0;
24312431
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
24322432
PRODUCT_NAME = ParseSwift;
24332433
SDKROOT = macosx;
@@ -2453,7 +2453,7 @@
24532453
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
24542454
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
24552455
MACOSX_DEPLOYMENT_TARGET = 10.13;
2456-
MARKETING_VERSION = 1.6.0;
2456+
MARKETING_VERSION = 1.7.0;
24572457
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwift;
24582458
PRODUCT_NAME = ParseSwift;
24592459
SDKROOT = macosx;
@@ -2600,7 +2600,7 @@
26002600
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
26012601
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
26022602
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2603-
MARKETING_VERSION = 1.6.0;
2603+
MARKETING_VERSION = 1.7.0;
26042604
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
26052605
MTL_FAST_MATH = YES;
26062606
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-watchOS";
@@ -2629,7 +2629,7 @@
26292629
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
26302630
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
26312631
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2632-
MARKETING_VERSION = 1.6.0;
2632+
MARKETING_VERSION = 1.7.0;
26332633
MTL_FAST_MATH = YES;
26342634
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-watchOS";
26352635
PRODUCT_NAME = ParseSwift;
@@ -2656,7 +2656,7 @@
26562656
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
26572657
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
26582658
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2659-
MARKETING_VERSION = 1.6.0;
2659+
MARKETING_VERSION = 1.7.0;
26602660
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
26612661
MTL_FAST_MATH = YES;
26622662
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-tvOS";
@@ -2684,7 +2684,7 @@
26842684
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
26852685
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
26862686
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
2687-
MARKETING_VERSION = 1.6.0;
2687+
MARKETING_VERSION = 1.7.0;
26882688
MTL_FAST_MATH = YES;
26892689
PRODUCT_BUNDLE_IDENTIFIER = "com.parse.ParseSwift-tvOS";
26902690
PRODUCT_NAME = ParseSwift;

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ Run `carthage update`, and you should now have the latest version of ParseSwift
7676

7777
After installing ParseSwift, to use it first `import ParseSwift` in your AppDelegate.swift and then add the following code in your `application:didFinishLaunchingWithOptions:` method:
7878
```swift
79-
ParseSwift.initialize(applicationId: "xxxxxxxxxx", clientKey: "xxxxxxxxxx", serverURL: URL(string: "https://example.com")!, liveQueryServerURL: URL(string: "https://example.com")!, authentication: ((URLAuthenticationChallenge,
80-
(URLSession.AuthChallengeDisposition,
81-
URLCredential?) -> Void) -> Void))
79+
ParseSwift.initialize(applicationId: "xxxxxxxxxx", clientKey: "xxxxxxxxxx", serverURL: URL(string: "https://example.com")!)
8280
```
8381
Please checkout the [Swift Playground](https://github.com/parse-community/Parse-Swift/tree/main/ParseSwift.playground) for more usage information.
8482

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.6.0 \
8+
--module-version 1.7.0 \
99
--theme fullwidth \
1010
--skip-undocumented \
1111
--output ./docs/api \

0 commit comments

Comments
 (0)