-
Notifications
You must be signed in to change notification settings - Fork 279
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 handle checks for cancelled subscriptions #44
Comments
You can use try function and need to edit this function in the library. typedef void (^checkReceiptCompleteResponseBlock)(NSDictionary* response,NSError* error); `- (void)checkReceipt:(NSData*)receiptData AndSharedSecret:(NSString*)secretKey onCompletion:(checkReceiptCompleteResponseBlock)completion
} |
I used this way to check subscription is expired or not. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
First of all, let me thank you for the great work. I'm a very happy adopter of your library since almost 2 years now ;)
I would like to implement a simple mechanism to properly handle cancelled subscriptions.
In other words, if a user disables the auto-renewal of the subscription, I would like to be aware of it and thus deactivate the corresponding in-app purchase(s) when the subscription expires.
What's the best way do it?
Will this be enough? Will this automatically clear subscriptions that are no longer active?
[[IAPShare sharedHelper].iap restoreProductsWithCompletion:^(SKPaymentQueue *payment, NSError *error) { if (error) { // error: do your stuff } else { // do your stuff } }];
Or should I clear in-app purchases before doing that?
[[IAPShare sharedHelper].iap clearSavedPurchasedProducts];
Thanks
The text was updated successfully, but these errors were encountered: