Typealiases

The following typealiases are available globally.

  • An opaque token used to unregister notification blocks from Realms.

    Declaration

    Swift

    public typealias NotificationToken = RLMNotificationToken
  • An enum of the different property types supported by Realm. Object type.

    See Realm Models.

    Primitive types

    • Int
    • Bool
    • Float
    • Double

    Object types

  • String
  • Data
  • Date

    Date

    Relationships: List (Array) and Object types

    • Object
    • Array

    Declaration

    Swift

    public typealias PropertyType = RLMPropertyType
  • Object class used during migrations.

    Declaration

    Swift

    public typealias MigrationObject = DynamicObject
  • Provides both the old and new versions of an object in this Realm. Object properties can only be accessed using subscripting.

    Declaration

    Swift

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

    Parameters

    oldObject

    Object in original Realm (read-only).

    newObject

    Object in migrated Realm (read-write).

  • Migration block used to migrate a Realm.

    Declaration

    Swift

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

    Parameters

    migration

    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.

  • Closure to run when the data in a Realm was modified.

    Declaration

    Swift

    public typealias NotificationBlock = (notification: Notification, realm: Realm) -> Void