Protocols
The following protocols are available globally.
-
Objects that conform to the
See moreParseUser
protocol have a local representation of a user persisted to the Parse Data. This protocol inherits from theParseObject
protocol, and retains the same functionality of aParseObject
, but also extends it with various user specific methods, like authentication, signing up, and validation uniqueness.Declaration
Swift
public protocol ParseUser : ParseObject
-
Objects that conform to the
ParseObject
protocol have a local representation of data persisted to the Parse cloud. This is the main protocol that is used to interact with objects in your app.If you plan to use custom encoding/decoding, be sure to add
objectId
,createdAt
,updatedAt
, andACL
to yourParseObject
CodingKeys
.Note
ParseObject
s can be “value types” (structs) or reference types “classes”. If you are using value types there isn’t much else you need to do but to conform to ParseObject. If you are using reference types, see the warning.Warning
If you plan to use “reference types” (classes), you will need to implement your own==
method to conform toEquatable
along with with thehash
method to conform toHashable
. It is important to note that for unsavedParseObject
s, you won’t be able to rely onobjectId
forEquatable
andHashable
as your unsaved objects won’t have this value yet and is nil. A possible way to address this is by creating aUUID
for your objects locally and relying on that forEquatable
andHashable
, otherwise it’s possible you will get “circular dependency errors” depending on your implementation.Declaration
Swift
public protocol ParseObject: Objectable, Fetchable, Savable, Deletable, Hashable, CustomDebugStringConvertible
-
Receive/respond to notifications from the ParseLiveQuery Server.
See moreDeclaration
Swift
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *) public protocol ParseLiveQueryDelegate : AnyObject
-
This protocol describes the interface for handling events from a
See moreParseLiveQuery
client. You can use this protocol on any custom class of yours, instead of Subscription, if it fits your use case better.Declaration
Swift
public protocol ParseSubscription : AnyObject
-
Objects that conform to the
ParseInstallation
protocol have a local representation of an installation persisted to the Parse cloud. This protocol inherits from theParseObject
protocol, and retains the same functionality of aParseObject
, but also extends it with installation-specific fields and related immutability and validity checks.A valid
ParseInstallation
can only be instantiated via current because the required identifier fields are readonly. ThetimeZone
andbadge
fields are also readonly properties which are automatically updated to match the device’s time zone and application badge when theParseInstallation
is saved, thus these fields might not reflect the latest device state if the installation has not recently been saved.ParseInstallation
s which have a validdeviceToken
and are saved to the Parse Server can be used to target push notifications. UsesetDeviceToken
to set thedeviceToken
properly.Warning
Only useParseInstallation.current
installations on the main thread as they require UIApplication forbadge
Warning
Linux developers should setappName
,appIdentifier
, andappVersion
manually asParseSwift
doesn’t have access to Bundle.main.Declaration
Swift
public protocol ParseInstallation : ParseObject
-
Objects that conform to the
See moreParseRole
protocol represent a Role on the Parse Server.ParseRole
‘s represent groupings ofParseUser
objects for the purposes of granting permissions (e.g. specifying aParseACL
for aParseObject
). Roles are specified by their sets of child users and child roles, all of which are granted any permissions that the parent role has. Roles must have a name (which cannot be changed after creation of the role), and must specify aParseACL
.Declaration
Swift
public protocol ParseRole : ParseObject
-
See moreParseSession
is a local representation of a session. This protocol conforms toParseObject
and retains the same functionality.Declaration
Swift
public protocol ParseSession : ParseObject
-
A store that supports key/value storage. It should be able to handle any object that conforms to encodable and decodable.
See moreDeclaration
Swift
public protocol ParseKeyValueStore
-
Objects that conform to the
See moreParseCloud
protocol are able to call Parse Cloud Functions and Jobs. An object should be instantiated for each function and job type. When conforming toParseCloud
, any properties added will be passed as parameters to your Cloud Function or Job.Declaration
Swift
public protocol ParseCloud : ParseType, CustomDebugStringConvertible, Decodable
-
Objects that conform to the
See moreParseConfig
protocol are able to access the Config on the Parse Server. When conforming toParseConfig
, any properties added can be retrieved by the client or updated on the server.Declaration
Swift
public protocol ParseConfig : ParseType, CustomDebugStringConvertible, Decodable