Add combine publishers for all objects and types #73
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adding the publishers such as
Future
to all one-shot async calls, making Parse-Swift modernized and SwiftUI ready. All methods that are capable of “publishing” end with the wordPublisher
. This means that there are 3 ways to use most of the methods that send/receive info to a Parse Server: 1) sync, 2) async, and 3) publisher.As far as usage, you use the added publishers just like any other
Combine
publisher. The thing to remember is that all of the push/pull methods likesave
,fetch
, etc. areFutures
, so they start their work as soon as you call them and will only publish one result when finished. Any new subscriptions to an already fulfilledFuture
will produce the original result. This is different from theParseLiveQuery
Subscription
which will keep publishing events/subscriptions as long as it’s not cancelled.Combine
currently isn't supported on Linux, but if/when it ever is the combine features will automatically be available for use. Linux devs can use the async/sync callbacks instead.ParseUser.logout
to make it more predictable[.iOS(.v12), .macOS(.v10_13), .tvOS(.v12), .watchOS(.v5)]
. If a developer wants to support an older platform, they should use the Parse-Obj-C SDKSlightly breaking (compiler should suggest the correct fix):
delete
,deleteAll
,passwordReset
, andverificationEmail
use to all return anParseError
. These have all been switched to return a Result<Void, ParseError> instead to match everything else. This is helpful, becauseFuture
expects a result enum anyways