Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloud function/job calls and user password reset. #43

Merged
merged 46 commits into from
Jan 4, 2021
Merged

Conversation

cbaker6
Copy link
Contributor

@cbaker6 cbaker6 commented Dec 29, 2020

  • Also adds more command tests for User and cleans up user docs
  • Add server options to ParseUsers that were missing
  • Ensures ParseEncoder is used for Parse types while json encoder is used for others
  • Playground examples
  • Batches send in waves of 50 objects. This can be changed by the developer by changing batchLimit when calling saveAll or deleteAll
  • Commented out some of the Batch code for saving child ParseObjects that wasn't being used because it's in a non-working state. It's not needed for now, child objects are sent to the server 1 by 1 until a fix. This may cause more http overhead if there's a lot of unsaved children. I don't see this happening much unless a developer attempts to saveAll "many" ParseObjects that have "many" unsaved children. In this case, URLSession and the parse-server should still be able to handle the load. Batching still works for ParseObjects, just not for unsaved children.
  • Bug fix iOS 14 User logout does not erase session #44 where the SDK was calling the wrong endpoint to log out of users.
  • User and Installation now talk to their respective endpoints directly instead of through /classes
  • Adds verificationEmailRequest
  • Improves server response error handling
  • Add Swift 5.2 build to CI for backwards compatibility test

- Also adds more command tests for User and cleans up user docs
@codecov
Copy link

codecov bot commented Dec 29, 2020

Codecov Report

Merging #43 (5241554) into main (3f1c897) will increase coverage by 0.83%.
The diff coverage is 78.24%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #43      +/-   ##
==========================================
+ Coverage   75.73%   76.56%   +0.83%     
==========================================
  Files          32       35       +3     
  Lines        2724     3239     +515     
==========================================
+ Hits         2063     2480     +417     
- Misses        661      759      +98     
Impacted Files Coverage Δ
Sources/ParseSwift/API/Responses.swift 67.39% <ø> (-0.70%) ⬇️
...es/ParseSwift/Internal/BaseParseInstallation.swift 100.00% <ø> (ø)
Sources/ParseSwift/Internal/ParseHash.swift 94.11% <ø> (ø)
Sources/ParseSwift/Protocols/Deletable.swift 0.00% <ø> (ø)
Sources/ParseSwift/Protocols/Fetchable.swift 0.00% <ø> (ø)
...ces/ParseSwift/Protocols/LocallyIdentifiable.swift 0.00% <0.00%> (ø)
Sources/ParseSwift/Protocols/Queryable.swift 0.00% <ø> (ø)
Sources/ParseSwift/Protocols/Savable.swift 0.00% <ø> (ø)
Sources/ParseSwift/Types/ParseError.swift 80.00% <ø> (ø)
Sources/ParseSwift/Protocols/Fileable.swift 58.33% <16.66%> (ø)
... and 23 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3f1c897...5241554. Read the comment docs.

@cbaker6 cbaker6 requested a review from TomWFox December 30, 2020 02:24
@cbaker6
Copy link
Contributor Author

cbaker6 commented Dec 30, 2020

@TomWFox can you review the docs?

@pranjalsatija can you review?

Conflicts:
	ParseSwift.xcodeproj/project.pbxproj
	Sources/ParseSwift/API/API+Commands.swift
	Sources/ParseSwift/API/API.swift
	Sources/ParseSwift/API/Responses.swift
	Sources/ParseSwift/Object Protocols/ParseUser.swift
	Tests/ParseSwiftTests/ParseObjectBatchTests.swift
	Tests/ParseSwiftTests/ParseQueryTests.swift
- Added ResultsResponse for explain and hint
Copy link
Contributor

@TomWFox TomWFox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor changes... otherwise LGTM

Sources/ParseSwift/Object Protocols/ParseUser.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseUser.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseUser.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Types/ParseFile.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Types/ParseFile.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Types/ParseFile.swift Outdated Show resolved Hide resolved
@cbaker6
Copy link
Contributor Author

cbaker6 commented Dec 31, 2020

@TomWFox can you add spm-test-5_2 to the branch protections? This ensures we are still Swift backwards compatible, which I've managed to fix/break in the last couple of PRs. The issue is Swift 5.3 reduced the need for self. inside of closures, so the compiler for 5.3 doesn't complain when you don't use it. Older versions of Swift require the use of self inside of closures.

@cbaker6 cbaker6 requested a review from TomWFox December 31, 2020 14:50
@cbaker6
Copy link
Contributor Author

cbaker6 commented Jan 2, 2021

@TomWFox can you look at the documentation I added for the batchLimit argument of saveAll/deleteAll in ParseObject.swift, ParseUser.swift, ParseInstallation.swift? There are two of these in each file.

Sources/ParseSwift/Objects/ParseObject.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseObject.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseObject.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseObject.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseUser.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseUser.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseInstallation.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseInstallation.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseInstallation.swift Outdated Show resolved Hide resolved
Sources/ParseSwift/Objects/ParseInstallation.swift Outdated Show resolved Hide resolved
cbaker6 and others added 12 commits January 3, 2021 15:46
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
Co-authored-by: Tom Fox <13188249+TomWFox@users.noreply.github.com>
@cbaker6 cbaker6 merged commit f124d0a into main Jan 4, 2021
@cbaker6 cbaker6 deleted the cloudCode branch January 4, 2021 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iOS 14 User logout does not erase session
2 participants