I am using it in conjunction with my own server verifyReceipt endpoint and store subscription data on server, along with original transaction id + user id.
First, terminology for below situations:
appuser = user login for my own app
appstore user = user login for iTunes / appstore
However, I am confused on a few things:
What should be the source of truth?
For entitlement engine to work, receipt must be sent to server. If appuser signs in on Device A, purchases product P, then signs in on Device B, no / empty receipt will exist on Device B.
Obviously, this appuser will download subscription data I stored on server during previous verifyReceipt call. Is this OK? How do I know if my server knows the truth about this appuser?
Should this be restoreTransaction flow, or simple REST call? If my server holds latest subscription data based on receipts, what should restoreTransaction do?
Also, if appuser remains the same, but appstore user changes (different itunes id) - what is the way to tackle?
1 - Is Apple OK if I allow access to purchased content via this appUser but different appstore user who never purchased it?
2 - Vice versa, if appuser is altered, but appstore user remains the same, what is correct entitlement?
Does Apple has any say on above 2 scenarios or is it just me who gets to decide?
Probably too many questions, but it is bit confusing in conjunction with storekit callbacks (transaction observers etc) and I am wondering if there is well-established universal approach other developers are following....