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

Add support for didRevokeEntitlementsForProductIdentifiers #59

Open
ryanmeisters opened this issue Aug 9, 2020 · 5 comments
Open

Add support for didRevokeEntitlementsForProductIdentifiers #59

ryanmeisters opened this issue Aug 9, 2020 · 5 comments

Comments

@ryanmeisters
Copy link

Thanks for an awesome library @benjaminmayo 🙌

iOS 14 adds a new didRevokeEntitlementsForProductIdentifiers delegate method to SKPaymentTransactionObserver (docs here)

From the docs:

The system calls this delegate method whenever App Store revokes in-app purchases for the user. For example, it’s called when a user leaves a family sharing group that was sharing in-app purchases. By leaving the family group, the user is no longer entitled to the shared in-app purchases.

The productIdentifiers parameter contains the revoked product IDs. Your app should check the receipt on the device, which the system automatically updates prior to calling this method, and provide the correct level of access for the in-app purchases — which may now be no access. If you use server-side receipt validation with the App Store, call your server to reprocess the receipt and update your purchase records.

@benjaminmayo
Copy link
Owner

Thanks for bringing this to my attention. I haven't looked at the iOS 14 StoreKit stuff yet. The good news is this API should be easily supportable inside of MerchantKit in a future update.

@imWildCat
Copy link

@benjaminmayo could I create a PR to add this capability?

Looks like this one is related to #70

@benjaminmayo
Copy link
Owner

Sure, I'm happy to look at anything put forward. The implementation of this should prolly consist of a call to checkReceipt from the didRevoke... delegate callback.

@imWildCat
Copy link

I created a draft PR: #71

Could you help to check whether it is on the right direction?

@imWildCat
Copy link

Update: I'm very new to IAP. Just found that this library (https://github.com/tikhop/TPInAppReceipt) can parse the receipt. Will investigate it.

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