MCSubscriber
public class MCSubscriber: SubscriptionErrorHandler
This public class handles Magic Cloud’s CKQuerySubscriptions, allowing for receivers to be listen for changes while handling any errors that might arise.
-
This public class handles Magic Cloud’s CKQuerySubscriptions, allowing for receivers to be listen for changes while handling any errors that might arise (does NOT currently work with generic error handling).
Declaration
Swift
public init(forRecordType type: String, withConditions triggers: CKQuerySubscriptionOptions = [.firesOnRecordUpdate, .firesOnRecordDeletion, .firesOnRecordCreation], on db: MCDatabase = .publicDB)
Parameters
type
CKRecord.recordType that subscription listens for changes with.
triggers
CKQuerySubscriptionOptions for subscription.
db
DatabaseType for subscription to be registered to.