Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement hasReceipt method #126

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

franvera
Copy link

@franvera franvera commented Oct 5, 2017

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

Copy link
Owner

@chirag04 chirag04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code wise this looks good. Can you point me to some documentation regarding this?

@franvera
Copy link
Author

franvera commented Oct 5, 2017

@chirag04 well, you know how great Apple documentation is </sarcasm>.
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants