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

how to check if the product was purchased or not. #20

Closed
nsoud opened this issue Apr 16, 2016 · 2 comments
Closed

how to check if the product was purchased or not. #20

nsoud opened this issue Apr 16, 2016 · 2 comments

Comments

@nsoud
Copy link

nsoud commented Apr 16, 2016

ho to check if a product was previously purchased
Thank you very much

@bizz84
Copy link
Owner

bizz84 commented Apr 18, 2016

There is no API in SwiftyStoreKit for this. You could do the following:

  • Once the user makes a purchase the first time after installing the app, store the purchase information locally, for example using the keychain. You can then query you keychain anytime to see if the product has been purchased
  • One advantage of using the keychain is that the information will still be there even if the user deletes and reinstalls the app. See this answer.
  • If you don't use the keychain, you can still rely on the restore purchases call to be requested by the user after she has reinstalled the app.

@bizz84 bizz84 closed this as completed Apr 21, 2016
@acegreen
Copy link

@bizz84 A side question related to this. Does this library have a function to check expiration of a subscription? I would to check somewhere if the subscription is valid and then take away privileges if it expires.

@Vithanco Vithanco mentioned this issue Nov 3, 2018
9 tasks
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

No branches or pull requests

3 participants