-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening a realm with initialSubscriptions while offline blocks its initialisation #7712
Comments
Yes I faced the similar issue. Is there any workaround ? |
Hi @vikrantuk. Yes, there is. Calls to |
@edualonso Thanks for responding. The problem is I'm using async method getInstanceAsync(config) which expects config to be passed and it might cause the same issue as config passed to Realm.setDefaultConfig has entry of intialSubscription passed into it. |
You should change the way you initialise your
Please observe this will not work if you have not added initial subscriptions before introducing this change. You must have been able to add these subscriptions at a prior point in time. |
@edualonso Thanks.. I wasn't aware there is no need to set initialsubscriptions again. What I thought was running Realm.setDefaultConfig(config) again will overwrite the last set config and hence initialsubscription will also get wiped up. Thanks for the clarification :) |
Also are there resources where these minute things are covered. I had no idea about this from the documentation |
Hi @vikrantuk.
I'm afraid there aren't more resources than what's available in the official documentation. We will try to improve it to make it clearer in future modifications. |
@edualonso Using your
|
Opening a realm after having specified initialSubscriptions in the sync config while offline causes the initialisation to hang. We should be able to open a flexible sync enabled realm with subscriptions even if the device has no connectivity.
The text was updated successfully, but these errors were encountered: