On this page
If you want your app to update data in the background (while the app is minimized), iOS requires you to implement Background App Refresh. Enabling Background App Refresh minimizes the time it takes for the user to see the most recent data; without Background App Refresh, Realm updates the data when the user launches the app, potentially resulting in noticeable lag.
To use the realm while the device is locked, you must adjust the file protection settings. See Use Realm When the Device Is Locked.