iOS:如何检查是否启用了应用程序内购买?

iOS:如何检查是否启用了应用程序内购买?,第1张

概述有一些功能可以检查用户是否启用了某些功能.就像位置或相机滚动一样. 但是,如何检查是否启用了应用程序内购买? 这对你有帮助: if ([SKPaymentQueue canMakePayments]) { // start adding the payment to the payment queue} else { // handle the restriction @H_301_1@ 有一些功能可以检查用户是否启用了某些功能.就像位置或相机滚动一样.

但是,如何检查是否启用了应用程序内购买?

解决方法 这对你有帮助:

if ([SKPaymentQueue canMakePayments]) {     // start adding the payment to the payment queue} else {     // handle the restriction}

它是关于canMakePayments类方法的SKPaymentQueue类引用:

YES if the user is allowed to authorize payment. NO if they do not have permission.

以及对同一方法的进一步说明:

An iPhone can be restricted from accessing the Apple App Store. For example,parents can restrict their children’s ability to purchase additional content. Your application should confirm that the user is allowed to authorize payments before adding a payment to the queue. Your application may also want to alter its behavior or appearance when the user is not allowed to authorize payments.

总结

以上是内存溢出为你收集整理的iOS:如何检查是否启用了应用程序内购买?全部内容,希望文章能够帮你解决iOS:如何检查是否启用了应用程序内购买?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/1069615.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-26
下一篇2022-05-26

发表评论

登录后才能评论

评论列表(0条)

    保存