iPhone 应用程序内购买
我正在开发一个 iPhone 应用程序。为此,我已成功添加应用内购买功能。它非常适合单件商品购买。我的问题是,如何通过向 App Store 发出单一购买请求来购买多件商品? 有人可以帮助我吗?
I am developing a iPhone app. For that i have successfully add the In App Purchase functionality. It is working perfectly for a single item purchase. My problem is that How can i do this for multiple item purchase with single purchase request to App Store?
Can anybody help me for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以在SKPayment中使用数量属性...读取您想要从用户那里获得的商品数量,然后将此值传递给 payment.quantity(默认情况下)是1)。
You can use quantity property in SKPayment... Read how many items you want from user then pass this value to payment.quantity(By default it is 1).
每次购买都需要用户的授权,所以我认为你不能为所欲为。
但是,您可以进行一次应用内购买,其定价和行为就像多个项目组合在一起一样。例如:
Each purchase needs authorization from the user, so I don't think you can do what you want to.
However, you can make a single in-app purchase which is priced and behaves like multiple items clubbed together. For instance: