tikhop / TPInAppReceipt

Reading and Validating In App Purchase Receipt Locally.
MIT License
635 stars 95 forks source link

Auto Renew is enable or not #76

Closed HirenSensussoft007 closed 3 years ago

HirenSensussoft007 commented 3 years ago

How can I get value of Auto renewable on/off from active purchases

tikhop commented 3 years ago

Hi @HirenSensussoft007,

All active purchases are auto renewable. If you want to check whether a purchase is auto renewable you can do:

let purchase = ... 

if purchase.isRenewableSubscription
{
    // Do something
}
HirenSensussoft007 commented 3 years ago

@tikhop I think you didn't get my point I mean is that If the user off the auto-renewing subscription from Settings then How can I get that status in App

Please help

tikhop commented 3 years ago

@HirenSensussoft007

Well, I'm not sure that user can off the auto-renewing subscription. User can cancel the auto-renewing subscription, in that case you can check whether it's canceled or not.

HirenSensussoft007 commented 3 years ago

@tikhop Yes, It's possible to off auto-renewing(recurring) subscription from settings. Thats why I facing issue about that how can I get recurring status of product?

tikhop commented 3 years ago

It’s impossible. You can either check whether a subscription is canceled or still active. If you cancel the subscription from settings then you will get an updated receipt where you can see that the subscription is canceled (not active anymore).