chirag04 / react-native-in-app-utils

A react-native wrapper for handling in-app payments
MIT License
890 stars 185 forks source link

Implement hasReceipt method #126

Open franvera opened 6 years ago

franvera commented 6 years ago

Method is useful for knowing if there is a receipt or not. This way we can prevent prompting the user on start or when the app has not completed any purchases

franvera commented 6 years ago

@chirag04 well, you know how great Apple documentation is \. Only official info I can find is here, where Apple points out that the receipt is not guaranteed to be present: https://developer.apple.com/documentation/foundation/nsbundle/1407276-appstorereceipturl For what I have experienced, read in this repo and found on stackoverflow, it seems that new or restored apps have no valid receipt locally. hsaReceipt can be used to know if that's the scenario and ask user to either purchase/subscribe or restore purchases.