Home How to migrate local realm to synced realm
Reply: 0

How to migrate local realm to synced realm

user1047
1#
user1047 Published in April 23, 2018, 9:36 am

I have a project which used Realm as a local database. Now I want it to become online by using Realm Cloud. I got confused about how to migrate them. Start with RealmConfiguration and SyncConfiguration, after that is SchemaVersion too. My local configuration:

RealmConfiguration.Builder _config = new RealmConfiguration.Builder();
        _config.name("myABCXYZ.realm");
        _config.schemaVersion(MyRealmMigration.CURRENT_REALM_VERSION);
        _config.migration(new MyRealmMigration());
        RealmConfiguration config = _config.build();

This one i copied from PartialSync example app

SyncConfiguration configuration = new SyncConfiguration.Builder(
                SyncUser.current(),
                REALM_BASE_URL + "/default")
                .partialRealm()
                .build();
        Realm.setDefaultConfiguration(configuration);

I don't have any idea for this. But I don't see any tutorial related to my problem.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.307067 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO