There are some function to check if user enable some feature. Just like location or camera roll.
But, how to check if In-App purchase enabled?
Find out if an app offers in-app purchases Before downloading an app, you can check if it offers in-app purchases: On the Google Play Store app, in-app purchases will be by the Price or Install button. On play.google.com/store, you'll see "Offers in-app purchases" below the name of the app.
You can also identify free apps in the App Store by the download button, which is marked "Get" for all free apps (it will instead show a price if it costs money).
this may help on you:
if SKPaymentQueue.canMakePayments() {
// you can, so start adding the payment to the payment queue
} else {
// you may not, handle the rejection
}
if ([SKPaymentQueue canMakePayments]) {
// you can, so start adding the payment to the payment queue
} else {
// you may not, handle the rejection
}
it is from the SKPaymentQueue
class reference about canMakePayments()
class method:
true
if the user is allowed to authorize payment.false
if they do not have permission.
and further explanation for the same method:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With