Constants

The following constants are available globally.

  • This notification is posted by a Realm when the data in that Realm has changed.

    More specifically, this notification is posted after a Realm has been refreshed to reflect a write transaction. This can happen when an autorefresh occurs, when -[RLMRealm refresh] is called, after an implicit refresh from -[RLMRealm beginWriteTransaction], or after a local write transaction is completed.

    Declaration

    Objective‑C

    extern const RLMNotification 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 RLMRealmDidChangeNotification