Subscription development for App on iOS Store and OS store?

I'm developing a multiplatform app, that will run on mobile and desktop. And it will be subscription based.

What I don't get, is how does it work across the 2 stores? If someone signs up for a subscription on the Mac app store, how will the iOS app store, know the person has already subscribed in the other version? And vice versa?

Would the user just download whatever version, fire it up and then I could just offer for the person to sign in, if they already have an account and then I'll know if they are subscribed or not?

Subscription development for App on iOS Store and OS store?
 
 
Q