23

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

gmcnaughton
  • 2,233
  • 1
  • 21
  • 28
hfossli
  • 22,616
  • 10
  • 116
  • 130
  • I guess you can have this information stored, you know that the particular product is available on trail basis so you can display this information to user while displaying product info. – Nuzhat Zari Jun 04 '13 at 08:36
  • I guess what you are suggesting, @NuzhatZari, is that I retreive information about trial period from a server I maintain, right? – hfossli Jun 04 '13 at 09:56
  • I am trying to create one with a free-trial period, but I don't see the "Offer a free trial" option - have Apple removed this feature? – jhabbott Nov 06 '13 at 14:15

3 Answers3

9

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.

hfossli
  • 22,616
  • 10
  • 116
  • 130
Gianluca Tranchedone
  • 3,598
  • 1
  • 18
  • 33
  • 1
    Thanks for answering. The point is that before the user does any purchase I want to present to the user that there is an ongoing trial-period and the first month is for free. So the question is: how can I get information about the trial period from StoreKit or iTunesConnect? I want it to be dynamic – hfossli Jun 13 '13 at 14:16
  • 2
    Oh, I see. I didn't got what you meant. I'm not even sure if you can change the trial period once the item gets approved from the review team. Anyway, if you could, apparently there's no way to get that information at the moment. What you might do, though, is to work around this limitation by parsing the product description (if editable once the product is available to be purchased…) to check for a piece of string that tells you whether the item has a 7 or 30 days trial. – Gianluca Tranchedone Jun 13 '13 at 14:33
  • 2
    I suggest you file a radar to Apple. They might add that feature if they didn't yet with iOS 7. – Gianluca Tranchedone Jun 13 '13 at 14:41
  • 1
    It is possible to get information about trial period before purchase subscription (without SKPayment)? – poGUIst Aug 01 '14 at 11:54
3

On the client side you usually identify the different products and characteristics by their product identifier as the App Store does not deliver certain information such as subscription period and free trial period.

So if your product ID is for example: com.domain.app.product_paid1month_free7days you split the ID on the client side and know that the paid subscription duration is 1 month and the product has a free trial period of 7 days.

Of course one approach would be to transmit the product ID to your own server to get its characteristics as response. This way you can maintain the product list continuously without updating the binary and across versions.

Manuel
  • 14,274
  • 6
  • 57
  • 130
2

SKProduct > introductoryPrice

Available since iOS 11.2

https://developer.apple.com/documentation/storekit/skproduct/2936878-introductoryprice?language=objc

Damian Rzeszot
  • 548
  • 3
  • 12