Protocols

The following protocols are available globally.

Sign In With Apple Extension

  • Use this delegate to be provided a callback once authentication has succeed or failed

    See more

    Declaration

    Objective-C

    @protocol RLMASLoginDelegate

    Swift

    protocol RLMASLoginDelegate

RLMBSON

  • Protocol representing a BSON value. BSON is a computer data interchange format. The name “BSON” is based on the term JSON and stands for “Binary JSON”.

    The following types conform to RLMBSON:

    NSNull NSNumber NSString NSData NSDateInterval NSDate RLMObjectId RLMDecimal128 NSRegularExpression RLMMaxKey RLMMinKey NSDictionary NSArray

    See

    RLMBSONType

    See

    bsonspec.org
    See more

    Declaration

    Objective-C

    @protocol RLMBSON

    Swift

    protocol RLMBSON
  • A homogenous collection of Realm-managed objects. Examples of conforming types include RLMArray, RLMResults, and RLMLinkingObjects.

    See more

    Declaration

    Objective-C

    @protocol RLMCollection <NSFastEnumeration, RLMThreadConfined>

    Swift

    protocol RLMCollection : NSFastEnumeration, RLMThreadConfined
  • Delegate which is used for subscribing to changes on a [RLMMongoCollection watch] stream.

    See more

    Declaration

    Objective-C

    @protocol RLMChangeEventDelegate

    Swift

    protocol RLMChangeEventDelegate
  • Delegate which is used for subscribing to changes.

    See more

    Declaration

    Objective-C

    @protocol RLMEventDelegate <NSObject>

    Swift

    protocol RLMEventDelegate : NSObjectProtocol
  • Transporting protocol for foreign interfaces. Allows for custom request/response handling.

    See more

    Declaration

    Objective-C

    @protocol RLMNetworkTransport <NSObject>

    Swift

    protocol RLMNetworkTransportProtocol : NSObjectProtocol
  • Objects of types which conform to RLMThreadConfined can be managed by a Realm, which will make them bound to a thread-specific RLMRealm instance. Managed objects must be explicitly exported and imported to be passed between threads.

    Managed instances of objects conforming to this protocol can be converted to a thread-safe reference for transport between threads by passing to the +[RLMThreadSafeReference referenceWithThreadConfined:] constructor.

    Note that only types defined by Realm can meaningfully conform to this protocol, and defining new classes which attempt to conform to it will not make them work with RLMThreadSafeReference.

    See more

    Declaration

    Objective-C

    @protocol RLMThreadConfined <NSObject>

    Swift

    protocol RLMThreadConfined : NSObjectProtocol