Constants

The following constants are available globally.

Enums

Notification Constants

  • This notification is posted when a write transaction has been committed to a Realm on a different thread for the same file.

    It is not posted if autorefresh is enabled, or if the Realm is refreshed before the notification has a chance to run.

    Realms with autorefresh disabled should normally install a handler for this notification which calls -[RLMRealm refresh] after doing some work. Refreshing the Realm is optional, but not refreshing the Realm may lead to large Realm files. This is because an extra copy of the data must be kept for the stale Realm.

    Declaration

    Objective-C

    extern const RLMNotification _Nonnull RLMRealmRefreshRequiredNotification
  • This notification is posted by a Realm when a write transaction has been committed to a Realm on a different thread for the same file.

    It is not posted if -[RLMRealm autorefresh] is enabled, or if the Realm is refreshed before the notification has a chance to run.

    Realms with autorefresh disabled should normally install a handler for this notification which calls -[RLMRealm refresh] after doing some work. Refreshing the Realm is optional, but not refreshing the Realm may lead to large Realm files. This is because Realm must keep an extra copy of the data for the stale Realm.

    Declaration

    Objective-C

    extern const RLMNotification _Nonnull RLMRealmDidChangeNotification

Error keys

Other Constants

  • The schema version used for uninitialized Realms

    Declaration

    Objective-C

    extern const uint64_t RLMNotVersioned
  • The corresponding value is the name of an exception thrown by Realm.

    Declaration

    Objective-C

    extern NSString *const _Nonnull RLMExceptionName
  • The corresponding value is a Realm file version.

    Declaration

    Objective-C

    extern NSString *const _Nonnull RLMRealmVersionKey
  • The corresponding key is the version of the underlying database engine.

    Declaration

    Objective-C

    extern NSString *const _Nonnull RLMRealmCoreVersionKey
  • The corresponding key is the Realm invalidated property name.

    Declaration

    Objective-C

    extern NSString *const _Nonnull RLMInvalidatedKey