Flexible Sync is configured and works … I store accountIds in custom_data.accountIds that limit which accounts a user can see. Uses can only see the ones defined there. As I understand, these changes (ie, add an additionl account that a user can see) will only take affect on the next sync session.
How do I force a new sync session? (I am not worried about detecting this change on the client, I just want to run it when I know there is a change).
I have tried the following (suggestion I have seen in other posts)…
realm.syncSession?.suspend()
try! await app.currentUser!.refreshCustomData()
realm.syncSession?.resume()
but this has not been successful in showing the newly added account. If I restart the app, it will usually cause the subscription to be reset and all works fine. How can I reset a subscription manually without making the user restart or login/logout?