0

I am creating offer codes with auto-renewable In-app purchases in swift. But when i use presentCodeRedemptionSheet(), it does not show any redemption page to redeem offer code. I am using below code, but nothing is happening on tapping the button.

let paymentQueue = SKPaymentQueue.default()
if #available(iOS 14.0, *) {
    DispatchQueue.main.async {
        paymentQueue.presentCodeRedemptionSheet()
    }
}
Witek Bobrowski
  • 2,858
  • 1
  • 14
  • 27

1 Answers1

1

Are you trying on the simulator?

This command only works on a real device not in the simulator.

jfgrang
  • 1,103
  • 13
  • 13
  • no, on a real device. Actually, I was trying to test it with the Sandbox acc but it was not working, i have checked the docs and found that it will only works with production apple acc. – Man_Parashar Jul 07 '21 at 05:36