I am trying to understand from the documentation the lifecycle management of flexible sync subscriptions.
I was just implementing a view and was getting all data I had read access to, even though I had added a ‘$0.owner_id = user.id’ parameter to the initialSub block for it. I wanted to list only this particular user’s data in this view.
Eventually, I deleted the app and data and reinstalled the app, and now I have the expected dataset.
I understand that initial subscriptions are relatively static and need to be updated or rerunOnOpen, but I think I misunderstood the lifecycle of subscriptions entirely. I thought rerunOnOpen was necessary if the sync session is still active and the app is restarted. I assumed that if the sync session was not active (user has been offline for days), then it would need to establish a new subscription (session).
I’m now thinking that for the purposes of subscription lifecycle, it is considered still existing if the sub’s dataset still exists in the realm (which it would pretty indefinitely if the user hasn’t used the app in a long time). The lifecycle has nothing to do with actual session activity?