iOS Swift Realm Sync Issue

Viewed 150

I used this configuration code for local storage.

var configuration = Realm.Configuration.defaultConfiguration
configuration.encryptionKey = getKey() as Data

I used this configuration code for sync with server.

let syncServerURL = URL(string: serverUrl + objectName!)!
var configuration = Realm.Configuration.defaultConfiguration
configuration.encryptionKey = getKey() as Data     configuration.syncConfiguration = SyncConfiguration(user: SyncUser.current!, realmURL: syncServerURL)

I create some data without sync, it is saved locally. However, if I turn on sync(different configuration), the previously created data(locally) is not synced to the server? How to sync already saved data?

1 Answers
Related