Publishing application for specific duration - ios

I am first time developing an application which will have licensing to iPhone Application,
Our requirement is to develop an application that will have a license key and a subscription period, say 1 Month, 6 months, 1 Year.. Etc.
Once the subscription period is over user should not be able to reinstall the application without new subscription and license key, even if he/she has uninstalled the application.
How can this be done?

You could use a Non-Renewing Subscription in app purchase, This is the description in iTunes Connect : Non-Renewing Subscriptions allow the sale of services with a limited duration. Non-Renewing Subscriptions must be used for In-App Purchases that offer time-based access to static content. Examples include a one week subscription to voice guidance feature within a navigation app or an annual subscription to online catalog of archived video or audio.
or you could use a Auto-Renewable Subscription:
Auto-renewable Subscriptions allow the user to purchase updating and dynamic content for a set duration of time. Subscriptions renew automatically unless the user opts out, such as magazine subscriptions.

Alternative way:
You have to do the subscription process through some website instead of in-app purchase.
Don't go with license key. Just provide login credentials to the user once he subscribed. User has to subscribe externally to use the application (by getting the login credentials by mail to him). If the subscription period over, then just don't allow him to login and ask him to meet administration using the given generic mail id (user has to subscribe again).

Related

How to Handle Canceled iOS In App Purchase Auto-Renewing Subscription

I'm wondering, if a user cancels a subscription and are trying to resubscribe am I supposed to present the management portal from within the App Store to this user and let them resubscribe from within the App Store or am I supposed to allow them to purchase a new subscription from within the App itself? It seems as if once a user has purchased the initial subscription from within the app itself Apple wants all other management to be done using the App Store.
I'm not exactly sure how this works and because I cannot access the 'Manage Subscriptions' portal for a sandbox App Store account I can't tell exactly how subscriptions are handled when they expire.
Thank you!
From the App Store subscription management page a user will be able to:
Change their auto-renew status
Upgrade or downgrade to a different subscription in the same group (e.g. change from a monthly to yearly subscription)
Resubscibe to an expired subscription
Paulw11’s comment is correct that you handle a re-subscribe exactly as a purchase in your app (the user won't receive a free trial if they had before). The purchase will go through as a normal subscription and it will be less confusing to your users.

Differentiating two Users for In-App Purchases in Application to Buy Non-Renewable Subscription by different users?

I am implementing In-App Purchases first time in my application and new to In-app purchases Store Kit.
I have few doubts regarding In-app purchases:
What happens if a user purchased a subscription and logged out from the application and another user logs in and trying to purchase the same?
Does iTunes allow the second user to use the First user's purchased product?
If it allows how can we handle the second user's subscription?
What details we will get post Successful/Failed transactions from itunes to save in my database?
For a non-renewing subscription then it is entirely up to you to track expiration and determine what content a user has access to and when.
For example, say your subscription gave access to "the word of the day". If the subscription was active for the month of January, then the user would receive access to new words each day in January. The user should continue to be able to see January's words even after the subscription expires, but no new words.
If they resubscribe in March then they would now get new words throughout March.
You need to track all of this on your server against the user account.
Non-renewable subscription IAPs act much like consumable IAPs. The "Restore purchases" Store Kit function does not restore non-renewable IAP items.
To answer your specific questions:
If a new user logs in to your account system in the app (but the same iTunes account is still active on the device) then a second purchase will succeed and you need to update the subscription start and end dates for the new active account on your server.
You also need to cater for the following:
- The original account logs back in; In this case the original subscription entitlements need to be available
- The original or second account log in to another device; Again, the accounts subscription entitlements need to be available.
No, since non-renewing subscriptions are not restorable, the second user cannot "use" the first user's subscription.
You handle each account in your system independently.
Information about the mechanics of the purchase process are described in the In App Purchase Programming Guide

In-App Subscription Tiers?

I am researching in-app purchase viability in my app and have some queries.
Is it possible to have a multi -tiered subscription model with in-app purchase on iOS?
E.g. 4.99 for Basic, 9.99 for Advanced.
I would need the user to be able to change tier as and when they wanted, just as you would expect from any subscription service.
Is that possible? Does Apple support this?
Yes it's possible by opting out of the current subscription and then buying the Advanced Tier.
https://developer.apple.com/in-app-purchase/In-App-Purchase-Guidelines.pdf
Subscriptions and subscription renewals to content or services can be offered to customers for purchase.
!Renewal of an Auto-Renewing Subscription is handled automatically by the App Store. The user will be reminded shortly before their subscription is about to renew and all the billing is handled automatically by the App Store. Users can easily change their renewal frequency and can opt-out of the renewal by turning off the Auto-Renew switch at least 24 hours before the end of the current subscription period.

iOS In-App purchase subscriptions integration with a third party system

I need to build an app for a system, which already has a subscription on its website. It looks like Apple doesn't allow to use any own subscriptions and forces to integrate any app with iOS in-app subscriptions.
Is it any way to integrate two subscription systems? The main problem is that users can manage iOS subscriptions via iTunes and I can't find whether it's possible to get information about this and to stop subscription in the existing system if it's stopped via iTunes.
So is it possible to get notifications about unsubscribed iTunes users?
Using third party subscriptions
First off, it is possible to support an existing subscription system in your app, but it must be in addition to the App Store subscriptions. Also you have to be very careful about the UI you use. You can't prompt users to bypass the App Store and purchase through your server, but you can offer existing subscribers the ability to sign in with credentials they may have previously obtained through your website.
That said, Apple can be fairly capricious in their rulings on what is and isn't allowed in the App Store. I have worked on apps that have done this sort of thing, but they have been for fairly well known magazine publications. There's no guarantee that they will allow it for everyone.
Detecting unsubscribed App Store subscriptions
As for using App Store subscriptions, when a user purchases a subscription in your app, they will receive a receipt in the SKPaymentTransaction object. This receipt should be posted to your backend server to make sure it is valid before you give the user access to anything. See the In-App Purchase Programming Guide for more details.
When you setup a subscription type, you specify how long that subscription lasts. So if you log the transaction date in the SKPaymentTransaction when you receive a receipt, you can determine exactly when that subscription should expire by adding the duration of the subscription to the transaction date.
If it's an auto-renewing subscription, you will receive a new receipt when the subscription is renewed. So once you have validated that with your backend server, you can update your expiry date based on the new transaction date. If you don't receive a new receipt before the first one expires, it's likely the user has cancelled their subscription.
On the backend, your server can also tell when a particular subscription will expire based on the response from the verification server. First there is the status code which will tell you whether the subscription has already expired, but there is also an expiry date returned in the decoded receipt which will tell you when it is expected to expire if it hasn't already.
For more details, see the Auto-Renewable Subscriptions documentation.
Testing auto-renewing subscriptions
It's worth noting that when you are testing auto-renewing subscriptions in the App Store sandbox environment, the length of the various subscription types is dramatically shortened to make it easier to test. For example a 1 week subscription lasts only 3 minutes in the sandbox environment. You can see the full list of times in the iTunes Connect Developer Guide.
So you want the people that have bought the service from the website to be able to use the app, exactly like if they had purchased it from in App Purchases and in App Purchases people to be able to join the service just like people that joined through the site? As far as I know, Apple doesn't allow you to pay through other services as you said, but let's say someone buys the service from the app. What should happen would be that the money will be transferred to the company. Then after the payment you should include some code doing what the site does after a new person has payed for the service, so create his account as a paid account. Then, the app should also have a login screen where the registered users (no matter where they registered from) will be able to login into the app and use the service. Now the problem is indeed that if the subscription is stopped through iTunes you would never know, though a way around this would be to make a check in the server of this company which should monitor the income coming from one account. Then if this user has stopped paying (or stopped the subscription) you would be able to stop the service from the app. And you should recheck the server for payment after the duration of the subscription has passed, let's say a weekly subscription should be checked every week. (Sorry I would do this a comment but I haven't got enough reputation for this)

iOS - Inapp purchase - subscriptions

I'm having in-app purchase subscriptions in my app. I'm able to integrate and make subscriptions successfully. There are 3 different subscriptions, monthly, quarter and yearly.
So if user subscribes to monthly user can use that feature for 30 days. There's no server in my case. Only availability of some features will be activated/deactivated according to subscription.
When ever the app starts, i want to check whether user paid for subscription or not. If I'm maintaining some bool value in subscriptions, what if the user has deactivated the subscriptions from settings? How can I detect whether the subscriptions are valid or not?
You can add counter and add that counter value in a database that must be inside your app. Whenever user tries to access subscriptions you can verify from the database.
You have to post the receipt back to apple server and from the response we receive, we can identify the expiry date. Then I'll know whether the subscription is expired or renewed etc.
Visit Apple documentation

Resources