Hi,
I just trying to configure an initial Flexible Device Sync, but is not working, is not syncing data between the mongo atlas database and the local realm data base.
const app = new Realm.App({
id: 'XXXXXXX-YYYY',
});
const credentials = Realm.Credentials.apiKey(
'apikey1'
);
await app.logIn(credentials);
const realm = await Realm.open({
schema: [
Products,
Categories,
Variants,
Images,
TaxCategories,
TaxRates,
SubRates,
Channels,
Prices,
Zones,
InventoryEntires,
InventoryMessages
],
sync: {
flexible: true,
user: app.currentUser,
initialSubscriptions: {
update: (subs, realm) => {
subs.add(realm.objects('Products'));
}
}
}
});
const products = realm.objects(Products.name);
When i init my app i get the following message
Connection[1]: Session[1]: Begin processing pending FLX bootstrap for query version 0. (changesets: 1, original total changeset size: 1335)
Connection[1]: Session[1]: Integrated 1 changesets from pending bootstrap for query version 0, producing client version 8 in 10 ms. 0 changesets remaining in bootstrap
But the Products collections is never sync there is no documents
Somebody can tell me if i’m missing something?