Home iOS in-app purchase subscription get free trial period length from SKProduct
Reply: 2

iOS in-app purchase subscription get free trial period length from SKProduct

mjpablo23
1#
mjpablo23 Published in 2017-08-22 19:01:06Z

I am working on in-app purchases with subscriptions. In swift, you can get price and price locale from the SKProduct like so:

weeklyProduct.price.doubleValue  
weeklyProduct.priceLocale.currencySymbol

where weeklyProduct is a SKProduct.

Is it possible to get the free trial length? For example, I specified a two week free trial for the product. can I get this from the SKProduct?

Garrett Cox
2#
Garrett Cox Reply to 2017-10-11 23:01:17Z

Trial length is not included in the SKProduct information and will have to be hardcoded into the app or stored on your server. The only available option for deriving this type of information (currently) is from the receipt itself.

DanSkeel
3#
DanSkeel Reply to 2018-01-06 15:57:16Z

Starting from iOS 11.2 you can get info about trials using introductoryPrice property of SKProduct.

It contains instance of SKProductDiscount class, which describes all discount periods including free trials.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.304435 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO