swift- presentCodeDemptionsheet()不起作用
我想在应用程序中使用供应代码实现应用程序内购买,我已经在App Store Connect中设置了报价代码,并尝试显示赎回表以供用户输入报价代码。我阅读了一些使用PresentCodeDemptionsHeet()的解决方案。但是,不起作用,床单没有出现。这是我的代码:
@IBAction func applyOfferCodeButtonDidPress(_ sender: Any) {
if #available(iOS 14.0, *) {
SKPaymentQueue.default().presentCodeRedemptionSheet()
}
}
我有一个按钮,单击后,我想显示工作表。 谢谢。
I want to implement in-app purchase with offer code to my app, I have setup the offer code in App Store Connect and try to display the redemption sheet for users to enter the offer code. I read some solutions to use presentCodeRedemptionSheet(). However, is not working, the sheet is not coming up. Here is my code:
@IBAction func applyOfferCodeButtonDidPress(_ sender: Any) {
if #available(iOS 14.0, *) {
SKPaymentQueue.default().presentCodeRedemptionSheet()
}
}
I have a button, after clicked I want to display the sheet.
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在键盘上,Tap
返回
右下角上的按钮,而不是完成在上右上的按钮。On the keyboard tap
Return
button on the bottom-right corner, not theDone
button on the top-right.