SwiftyStoreKit icon indicating copy to clipboard operation
SwiftyStoreKit copied to clipboard

Need example how to use discounts

Open iTarek opened this issue 4 years ago • 3 comments

Question

Hello I need example how to use discounts,

I can not get this to work

SwiftyStoreKit.purchaseProduct(productSK!, quantity: 1, atomically: true, applicationUsername: "", simulatesAskToBuyInSandbox: false, paymentDiscount: productSK?.discounts.first)

I want to give users 3 days trial for example and I setup everything on the server, but I really don't understand how to do that...

Thank you

iTarek avatar Jun 19 '20 21:06 iTarek

I know that PaymentDiscount needs an SKPaymentDiscount to be initialized, but all examples I found uses a backend service to generate the parameters for SKPaymentDiscount.

Were you be able to solve it without a backend service, by any chance?

thejohnlima avatar Aug 25 '20 13:08 thejohnlima

i face the same question

huanghui1998hhh avatar Jul 03 '21 16:07 huanghui1998hhh

I think it's impossible to buy a discount without signing it on backend

jookovjookdev avatar Apr 17 '23 19:04 jookovjookdev