Realm Sync Configuration Files¶
You can configure Realm sync for your application in the sync
directory:
app/ └── sync/ └── config.json
Configuration¶
sync/config.json
{ "state": <"enabled" | "disabled">, "development_mode_enabled": <Boolean> "partition": { "key": "<Partition Key Field Name>", "type": "<Partition Key Type>", "permissions": { "read": { <JSON Expression> }, "write": { <JSON Expression> } } } }
Field | Description |
---|---|
state String | The current state of the Sync protocol for the application. Valid Options:
|
development_mode_enabled Boolean | If true , development mode is enabled
for the application. |
partition.key String | The field name of your app's partition key. This
field must be defined in the schema for object types that you want to
sync. |
partition.type String | The value type of the partition key field. This must match the type defined in the object schema. Valid Options:
|
partition.permissions.read JSON Expression | An expression that evaluates to true when a user
has permission to read objects in a partition. If the expression
evaluates to false , Realm does not allow the user to read
an object or its properties. |
partition.permissions.write JSON Expression | An expression that evaluates to true when a user
has permission to write objects in a partition. If the expression
evaluates to false , Realm does not allow the user to
modify an object or its properties. |
Give Feedback