Typealiases

The following typealiases are available globally.

  • An opaque token which is returned from methods which subscribe to changes to a Realm.

    See

    addNotificationBlock(_:)

    Declaration

    Swift

    public typealias NotificationToken = RLMNotificationToken
  • PropertyType is an enum describing all property types supported in Realm models.

    For more information, see Realm Models.

    Primitive types

    • Int
    • Bool
    • Float
    • Double

    Object types

    • String
    • Data
    • Date

    Relationships: Array (in Swift, List) and Object types

    Declaration

    Swift

    public typealias PropertyType = RLMPropertyType
  • An object class used during migrations.

    Declaration

    Swift

    public typealias MigrationObject = DynamicObject
  • The type of a migration block used to migrate a Realm.

    Declaration

    Swift

    public typealias MigrationBlock = (_ migration: Migration, _ oldSchemaVersion: UInt64) -> Void

    Parameters

    migration

    A Migration object used to perform the migration. The migration object allows you to enumerate and alter any existing objects which require migration.

    oldSchemaVersion

    The schema version of the Realm being migrated.

  • A block type which provides both the old and new versions of an object in the Realm. Object properties can only be accessed using subscripting.

    Declaration

    Swift

    public typealias MigrationObjectEnumerateBlock = (_ oldObject: MigrationObject?, _ newObject: MigrationObject?) -> Void

    Parameters

    oldObject

    The object from the original Realm (read-only).

    newObject

    The object from the migrated Realm (read-write).

  • The type of a block to run for notification purposes when the data in a Realm is modified.

    Declaration

    Swift

    public typealias NotificationBlock = (_ notification: Realm.Notification, _ realm: Realm) -> Void
  • A session object which represents communication between the client and server for a specific Realm.

    See

    RLMSyncSession

    Declaration

    Swift

    public typealias SyncSession = RLMSyncSession
  • A singleton which configures and manages the Realm Object Server synchronization-related functionality.

    See

    RLMSyncManager

    Declaration

    Swift

    public typealias SyncManager = RLMSyncManager
  • An object representing a Realm Object Server user.

    See

    SyncUser

    Declaration

    Swift

    public typealias SyncUser = RLMSyncUser
  • An error associated with the SDK’s synchronization functionality.

    See

    RLMSyncError

    Declaration

    Swift

    public typealias SyncError = RLMSyncError
  • A data type whose values represent different authentication providers that can be used with the Realm Object Server.

    See

    RLMIdentityProvider

    Declaration

    Swift

    public typealias Provider = RLMIdentityProvider
  • A closure type for a closure which is used by certain APIs to asynchronously return a User object to the application.

    See

    RLMUserCompletionBlock

    Declaration

    Swift

    public typealias UserCompletionBlock = RLMUserCompletionBlock
  • An enum representing the different states a sync management object can take.

    See

    RLMSyncManagementObjectStatus

    Declaration

    Swift

    public typealias SyncManagementObjectStatus = RLMSyncManagementObjectStatus
  • An enum which can be used to specify the level of logging.

    See

    RLMSyncLogLevel

    Declaration

    Swift

    public typealias SyncLogLevel = RLMSyncLogLevel
  • A closure type for a closure which can be set on the SyncManager to allow errors to be reported to the application.

    See

    RLMSyncErrorReportingBlock

    Declaration

    Swift

    public typealias ErrorReportingBlock = RLMSyncErrorReportingBlock