The alternative title is "How to deep copies data from an offline realm to a synced realm using Swift?"
After found out that the only option for How to upgrade a local realm to a synced realm? is to "clone" or copy all data from the local default realm to the synced realm, then the next question is how to perform the data cloning or copying for a local realm with complicated relationships between data objects.
Is there a recommended approach to copy the data from one realm to a synced realm while keeping the relationship between objects?
There was a realm.copyFromRealm
method but seems already deprecated.
Update
Found an official guide on "Add Sync to a Local-Only App", https://docs.mongodb.com/realm/sync/local-to-sync/