问题
I have a macOS app with auto-renewable subscription IAP and I want to add a free trial period. I'm trying to use app store "introductory offer" feature, but can't figure out how to get it working. I have configured a free trial introductory offer in itunes connect, but nothing changes when I try to buy the subscription from my app.
So my question is: Do I have to support this feature in my app's code (as described here https://developer.apple.com/documentation/storekit/in-app_purchase/implementing_subscription_offers_in_your_app?language=objc) with all that SKPaymentDiscount signature stuff? Or this is actually not needed in case of offering trial. I have seen some contradictory opinions in the internet. One is that free trial feature is simply not supported in sandbox environment. Is that true?
回答1:
You don't (can't) manage the trial eligibility yourself, Apple handles it. The "Subscription Offer" you linked to is different than the "Introductory Offer" that's used for free trials.
Introductory Offer - Only eligible for users that have never had a subscription
Subscription Offer - Only eligible for users that have had an active subscription at any point (including currently active)
After you've set up the auto-renewing subscription product. You add the "Free trial" as an introductory price under subscription pricing.
回答2:
Thanks for answers, finally got this working in both production (app store) and sandbox environments. No additional code is required on the client side, was my fault in itunes configuration (wrong date).
来源:https://stackoverflow.com/questions/55743205/free-trial-implementation-for-auto-renewable-subscription-for-macos-app