A notification indicating that changes were made to a Realm.

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

    didChange is posted after a Realm has been refreshed to reflect a write transaction, This can happen when an autorefresh occurs, refresh() is called, after an implicit refresh from write(_:)/beginWrite(), or after a local write transaction is committed.

  • 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 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.