Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

StoreKit on iOS - autorenewable subscription - How to know whether it is a free trial or not?

Tags:

In iTunes Connect it is possible to give a free trial period for autorenewable subscriptions.

App > Manage In App Purchases > Subscription Basic > 1 Month >  Offer a free trial? 

How can I get this information on the client? SKProduct does not have any information about this as I can see. Since we're having a marketing campaign it is very confusing for the end user to not see information about the product has a trial period.

Of course it is possible to fetch this kind of information from a server I maintain, but then we'll have the overhead with updating both our server and iTunes Connect. So I don't accept this kind of answer unless it is wired up to retrieving that trial period information from Apple's services.

Screenshot from iTunes Connect

like image 457
hfossli Avatar asked Jun 04 '13 08:06

hfossli


People also ask

How do I check my iOS app subscription?

Open the Settings app. Tap your name. Tap Subscriptions. Tap the subscription.

How do you tell if an app has a subscription?

To view and manage your Android subscriptions, open the Google Play Store app on your device, then tap the menu button (the three horizontal lines in the top left), then choose Subscriptions.

How do I cancel my free trial on iOS?

To view and cancel subscriptions via iOS or iPadOS, navigate to Settings, tap your username, and select Subscriptions, where you can view your active and expired subscriptions. Tap an active subscription you want to cancel, then tap Cancel Subscription (or Cancel Free Trial). Tap Confirm and you're done.


1 Answers

TLDR; It is not possible. You need to manage this information yourself.


When you process an SKPayment you get back a receipt. You should verify those receipts regularly for subscriptions (e.g. before downloading new content) as the user might have cancelled the subscription. When the user does cancel the subscription or the subscription expires you get back a descriptive error when verifying the purchase's receipt.

Moreover the receipt gives you all the information you need: for a given product you know which trial period you grant. Therefore when a purchase is made you could store the purchase date given from the purchase receipt in your model object or in the NSUserDefaults or in the Keychain alongside the purchase data. At this point you know when the trial is expired and verify that the subscription is still valid. If you can't you might want to disable access to the content until you're able to do so.

For more informations about purchase receipts and subscriptions check out the In-App Purchase Guide by Apple.

like image 114
Gianluca Tranchedone Avatar answered Oct 21 '22 10:10

Gianluca Tranchedone