This is on iOS only. I had a version of my app that only had one-time purchases for the “pro” features access. I made some major updates and transitioned to subscriptions, but decided to honor any previous lifetime purchases in the new version, while no longer offering that particular product for future users. In RC I’m achieving this by using the same entitlement but my current offering no longer includes the old product.
The problem is that occasionally I see a new transaction in RC dashboard where the customer info shows they made a previous purchase of the old pro product, followed by them making a purchase of the current product and an entry that says a new alias for them was created. My assumption is that the user is either re-installing or maybe using a new device? In my app, ideally I’d like to avoid this by checking if a user has the old product entitlement already, even if they’ve deleted and reinstalled or switched to a different device. I do have a “Restore” button on my paywall, so perhaps it’s on them to try this? But I’m unsure if there’s some other way I can avoid charging a user unnecessarily or relying on them trying the “Restore” option? What’s the best way using the SDK to ensure I don’t do this? Should I try restoring first before processing a purchase? Or is there some way I can connect a user’s new install/device to their old alias on launch?
EDIT: I just found the `syncPurchases` method, which I assume is what I’m looking for. But the documentation is a little confusing. Is this something I should call on every app launch? Will this automatically update the delegate/async stream with their customer info that should include their old entitlement as active?