Interacting with Stitch
Stitch utility class and the rest of the protocols here provide functionality for interacting with a MongoDB Stitch application. None of these classes or protocols are meant to be instantiated directly. All interaction with Stitch begins at the level of the
Stitch utility class.
StitchAppClienthas the fundamental set of methods for communicating with a MongoDB Stitch application backend.
An implementation can be initialized or retrieved using the
This protocol provides access to the
StitchAuthfor login and authentication.
serviceClient, you can retrieve services, including the
RemoteMongoClientfor reading and writing on the database. To create a
You can also use it to execute Stitch Functions.
Finally, itsSee more
StitchPushobject can register the current user for push notifications.
public protocol StitchAppClient
StitchAuthprovides methods for retrieving or modifying the authentication state of a
StitchAppClienthas an instance of StitchAuth.
Information about the logged-in
StitchUseris available in the
To watch for auth events, add aSee more
public protocol StitchAuth
StitchAuthDelegateis a protocol to be inherited when you need to take action on authentication events. An instance of a
StitchAuthDelegatemust be added to a
This protocol uses an extension to provide default implementations. This is for your convenience, so you do not have to implement every method here to satisfy the protocol requirements. This however does mean that if you plan on subclassing your implementation of
StitchAuthDelegate, you may run into unexpected issues where the empty default implementation is called instead of your subclass implementation. If this does happen in your code, see this article for more context and potential workarounds, or open an issue in our GitHub repository.
- Tag: StitchAuthDelegate
public protocol StitchAuthDelegate : AnyObject
StitchPush can be used to get clients that can register for push notifications via Stitch.See more
public protocol StitchPush
StitchUserrepresents the the user who is logged in to the
You will find information about the user such as name and email address in the
public protocol StitchUser : CoreStitchUser
StitchResultholds the result to an asynchronous operation performed against the Stitch server.
When an operation completes successfully, theSee more
StitchResultholds the result of the operation. When the operation fails, the
StitchErrorobject describing the reason for the failure.
public enum StitchResult<T>