Currently converting a local realm to a synced realm is only supported when using PBS. When trying to use the Realm::convert feature with flexible sync you get errors in the sync logs stating "cannot write to table \"SomeObject\" before opening a subscription on it"
e.g:
"reason":"cannot write to table \"SwiftPerson\" before opening a subscription on it"},{"table":"SwiftPerson","pk":"CmLrrE73Z7Qtrc8+yQ==","reason":"cannot write to table \"SwiftPerson\" before opening a subscription on it"},{"table":"SwiftPerson","pk":"CmLrrE73Z7Qtrc8+vg==","reason":"cannot write to table \"SwiftPerson\" before opening a subscription on it"}]}
Describe the solution you'd like
There is a discussion on slack with possible solutions to this request, but basically:
"Flexible sync requires that you create the subscriptions before creating any objects, and naturally a converted local realm won't have any subscriptions"
"One way to make it work would be to push the initial subscriptions feature down to object store rather than implementing it in the SDKs, and somehow integrate that with the convert functionality to create those subscriptions before copying the objects over"
Describe your problem or use case
Currently converting a local realm to a synced realm is only supported when using PBS. When trying to use the
Realm::convert
feature with flexible sync you get errors in the sync logs stating"cannot write to table \"SomeObject\" before opening a subscription on it"
e.g:
Describe the solution you'd like
There is a discussion on slack with possible solutions to this request, but basically: