In my application, I'm using auto renewable subscription. But apple rejected the app saying that, i've to use non-renewable subscription. I changed the corresponding things in itunes connect. but the problem is that how can I get the expiry date of the non-renewable subscription after making a purchase. do I have to do it manually by adding the number of days to current date and calculate it?
We have to monitor it manually with in the code.
Related
I am having an app which contains auto renewable subscription. The renewal of the subscription occurs every month. We have designed our app in a way that user get "1 credit" every month after the subscription renews. Now we have a new requirement in which we have to implement Offer Code or Promo Code which offers Subscription for free for a 1 year. Will we get monthly subscription renewal App Store notification during this offer period?. I just want to confirm this as there is no provision to test Offer codes in sandbox mode. This is critical to our design as if we don't get App Store notification user will not be credited his coin for 1 year.
I not sure you really need notifications.
You can read the app receipt on launch or foreground move ( you probably already do it ), enumerate all expired subscriptions and use expiration dates and other properties to get your credits.
By replaying the scenario, you can get the state at any past date up to now.
I want to implement InApp purchase in my iOS video streaming app to do that I need to implement Non-renewing subscription e.g 1 month,3 months, 6 months and 1 year.
I am using Objetive-C in my application.
Can you please tell me how to implement it because as per Apple, developer need to manage subscription expiration date and time.
How to validate receipt ??
How to manage user's subscription on multiple device or restore user's subscription if user login on other device ??
Please help me and let me know if anything is required in Non-renewing subscription.
Thanks,
You should go through the in-app purchase programming guide before starting the implementation.
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Introduction.html
Store-kit won't send you any notification in case of subscription end for a non-renewable subscription. You need to calculate the duration on your own and revoke the user's access to your server after that duration.
To verify the receipt you can do the validation on user's device or on your server, but your server is preferably better and even recommended by apple also.
For restoring the purchase you can go through the following doc
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/StoreKitGuide/Chapters/Restoring.html#//apple_ref/doc/uid/TP40008267-CH8-SW9
Non Renewing subscription
First of non renewing subscription is the consumable keys that means once it purchased it just purchased. Keep in mind Storekit doesnot restore consumable products so you have to manage yourself because StoreKit does not do it as it do in Auto-renewable subscriptions and Non-consumable .
More details about Non renewing subscription :
Does Non-Renewing subscription requires a restore button?
How to manage?
To manage your in-app purchase you have to use server DB. You have to store your all purchases in server DB by using post API.
Benefits:
You can easily maintain the end date of purchase.
You can get each paid account every time user logged in with any device.
Note: Maintain your DB according to your need.
I have an app that supports auto renewal and I am trying to determine if I should should keep checking past a renewal date for the auto renewable subscription if Apple tries to renew it past the date if there is an issue with the transaction failing or some other reason. If so, how long?
Thanks
If a subscriber of your App has opted for auto renewal then Apple will keep renewing his/her a/c till the time the subscriber doesn't opt out from it.
Also till the time the billing method which the subscriber has provided the information is valid.
Regards
Rajeev
I'm trying to work out the best mechanism to handle the auto renewing part so that it handles the continuation of the subscription into the next period.
What the best way of handling this?
Should I have an NSTimer set to check if the current expires_date has been reached .. and then try send a purchase request?
Apple iOS in-app purchases provides the product "Auto-renewable subscription". This product will be renewed automatically by Apple.
When you use this type of product, your app has to verify if the auto-renewable subscription is still valid, since the user might have cancelled the subscription. When an user cancel a subscription, the subscription remains valid until the end of the subscription period.
To validate an auto-renewable subscription, you have to use the purchase receipt and the shared secret generated for your app in-app purchases in iTunes Connect. You have to post this two things to the App Store. This will return a JSON and you have to get from this data the "
subscription's latest purchase date". From that date you have to calculate the expiration date and validate or invalidate the subscription.
You can do all this validation after application launch and/or when the model is updated.
Additional information
You can find information about auto-renewable subscription in Apple documentation. Also, you can check about MKStoreKit, which is a framework that reduces the amount of code that you have to write for the use of StoreKit, and supports Auto-renewable subscriptions.
My update for my iOS app with auto-renewing subscriptions was rejected, and the reason is that I must switch to non-renewing subscriptions. I can do that, but I am not clear about how to transition. I have many subscribers with auto-renewing subscriptions, so what happens when a user updates to the non-renewing version and then their current subscription auto-renews? Do I have to still handle those subscriptions as before? Or what?
Here are some basic guidelines:
- Don't let any new users subscribe using Auto.
- If you're not already you should be using your server to store and verify receipts as apposed to doing it from the app.
- When someone buys a a Non-Renew, you calculate the expiration. Not Apple.
- restoreCompletedTransactions doesn't work with Non-Renewing Subscriptions (NRS).
- Apple requires you build a system to sync subscriptions across a person's multiple devices. Unlike ARS, NRS doesn't do that automatically.
- They require that you implement an optional user/password system to accomplish this.
- I was rejected for not properly complying. Ask me if you have questions.
- As you probably know, only a user can cancel an auto-renewing subscription. Not you. Unless Apple wants to step in to help the transition. But you could encourage people to cancel they're ARS and purchase an NRS. It'll probably have to be done in two steps like that. You could even offer them 2 weeks free if they transition. You can do this now since, with NRS, you calculate the expiration date. Not Apple.
- Since you'll have to have both types running for a while until everyone is switched. It's only fair to continue to honor the ARS expiration date. So you should calculate the expiration date by starting with the ARS expiration provided by Apple and then adding any NRS durations that have been purchased. Being careful to extend it if a new ARS renewal appears.