I am implementing In App purchases in my app ,with auto renewable subscription , Now i am confusing that how i know that when the user is cancelled auto-renewable subscription or not
When user purchase any subscription using in app purchase, apple provide a Receipt for each purchase or transaction. Now you can anytime verify the subscription of user using this receipt. When you will pass this receipt to apple server it will provide you with the user current subscription (if available) along with the current receipt also.
For learning more about receipt validation go through this apple link. May be it will solve your issue.
You need to track the expiration date of the current subscription. If you don't get a new subscription transaction at the start of the next period you can assume that the renewal has been cancelled.
From the In-App Purchase Programming Guide -
After a subscription is successfully renewed, Store Kit adds a transaction for the renewal to the transaction queue. Your app checks the transaction queue on launch and handles the renewal the same way as any other transaction. Note that if your app is already running when the subscription renews, the transaction observer is not called; your app finds out about the renewal the next time it’s launched.
来源:https://stackoverflow.com/questions/26015386/how-do-i-know-that-auto-renewalbe-subscription-is-cancelled-or-not