TL;DR: you’re trying to connect with
partial: true to a Realm that was created as non-partial, or you’re trying to do a full sync to a Realm that was created with
Longer explanation below…
Realm provides two synchronization types - query-based (formerly known as partial) and “full”.
With query-based synchronization you only synchronize objects that match the queries you’ve defined. This mode comes with fine-grained permissions that allow to control access at the object level.
The “full” mode synchronizes the entire Realm file and comes with path level permissions.
When you create a Realm, it is created either as a
reference or a
full Realm depending on how it gets created. If you connected in “full” mode, it gets created as a “full” Realm and path-level permissions apply. If you connected in query-based (partial) mode by setting
partial: true in your config, it will be created as reference Realm and fine-grained permissions will apply.
Once a Realm is created in either of these modes, it generally cannot switch to the other as that could expose it to security vulnerabilities (e.g. you thought you had protected it by applying restrictive fine-grained permissions but someone connects in “full” mode and downloads the entire Realm). That being said, in the next version of Realm Studio, we’ll ship functionality to change the type of the Realm in case you accidentally created it in the wrong mode.
Keep in mind that admin users can still open
reference Realms in “full” mode as they have full control over the server and applying restrictions for them doesn’t make sense.