ParseRemote
public class ParseRemote : OCKRemoteSynchronizable
Allows the CareKitStore to synchronize against a Parse Server.
-
Declaration
Swift
public weak var delegate: OCKRemoteSynchronizationDelegate?
-
If set, the delegate will be alerted to important events delivered by the remote store (set this, don’t set
delegate
).Declaration
Swift
public weak var parseRemoteDelegate: ParseRemoteDelegate? { get set }
-
Declaration
Swift
public var automaticallySynchronizes: Bool
-
The unique identifier of the remote clock.
Declaration
Swift
public var uuid: UUID!
-
A dictionary of any custom classes to synchronize between the CareKitStore and the Parse Server.
Declaration
Swift
public var customClassesToSynchronize: [String : PCKSynchronizable]?
-
A dictionary of any default classes to synchronize between the CareKitStore and the Parse Server. These are
PCKPatient
,PCKTask
,PCKCarePlan
,PCKContact
, andPCKOutcome
.Declaration
Swift
public var pckStoreClassesToSynchronize: [PCKStoreClass : PCKSynchronizable]!
-
Creates an instance of ParseRemote.
Declaration
Swift
public init(uuid: UUID, auto: Bool, subscribeToServerUpdates: Bool, defaultACL: ParseACL? = nil) throws
Parameters
uuid
The unique identifier of the remote clock.
auto
If set to
true
, then the store will attempt to synchronize every time it is modified locally.subscribeToServerUpdates
Automatically receive updates from other devices linked to this Clock. Requires
ParseLiveQuery
server to be setup.defaultACL
The default access control list for which users can access or modify
ParseCareKit
objects. If nodefaultACL
is provided, the default is set to read/write for the user who created the data with no public read/write access. ThisdefaultACL
is not the same asParseACL.defaultACL
. If you want the theParseCareKit
defaultACL
to match theParseACL.defaultACL
, you need to provideParseACL.defaultACL
. -
Creates an instance of ParseRemote.
Declaration
Swift
convenience public init(uuid: UUID, auto: Bool, replacePCKStoreClasses: [PCKStoreClass: PCKSynchronizable], subscribeToServerUpdates: Bool, defaultACL: ParseACL? = nil) throws
Parameters
uuid
The unique identifier of the remote clock.
auto
If set to
true
, then the store will attempt to synchronize every time it is modified locally.replacePCKStoreClasses
Replace some or all of the default classes that are synchronized
subscribeToServerUpdates
Automatically receive updates from other devices linked to this Clock. Requires
ParseLiveQuery
server to be setup.defaultACL
The default access control list for which users can access or modify
ParseCareKit
objects. If nodefaultACL
is provided, the default is set to read/write for the user who created the data with no public read/write access. ThisdefaultACL
is not the same asParseACL.defaultACL
. If you want the theParseCareKit
defaultACL
to match theParseACL.defaultACL
, you need to provideParseACL.defaultACL
. -
Creates an instance of ParseRemote.
Declaration
Swift
convenience public init(uuid: UUID, auto: Bool, replacePCKStoreClasses: [PCKStoreClass: PCKSynchronizable]? = nil, customClasses: [String: PCKSynchronizable], subscribeToServerUpdates: Bool, defaultACL: ParseACL? = nil) throws
Parameters
uuid
The unique identifier of the remote clock.
auto
If set to
true
, then the store will attempt to synchronize every time it is modified locally.replacePCKStoreClasses
Replace some or all of the default classes that are synchronized by passing in the respective Key/Value pairs. Defaults to nil, which uses the standard default entities.
customClasses
Add custom classes to synchroniz by passing in the respective Key/Value pair.
subscribeToServerUpdates
Automatically receive updates from other devices linked to this Clock. Requires
ParseLiveQuery
server to be setup.defaultACL
The default access control list for which users can access or modify
ParseCareKit
objects. If nodefaultACL
is provided, the default is set to read/write for the user who created the data with no public read/write access. ThisdefaultACL
is not the same asParseACL.defaultACL
. If you want the theParseCareKit
defaultACL
to match theParseACL.defaultACL
, you need to provideParseACL.defaultACL
. -
Declaration
Swift
public func pullRevisions(since knowledgeVector: OCKRevisionRecord.KnowledgeVector, mergeRevision: @escaping (OCKRevisionRecord) -> Void, completion: @escaping (Error?) -> Void)
-
Declaration
Swift
public func pushRevisions(deviceRevision: OCKRevisionRecord, completion: @escaping (Error?) -> Void)
-
Declaration
Swift
public func chooseConflictResolution(conflicts: [OCKEntity], completion: @escaping OCKResultClosure<OCKEntity>)