开发者

Error in In App Purchase: Parental Controls are enabled

开发者 https://www.devze.com 2023-03-16 07:25 出处:网络
I want to implement In App Purchase in my iPhone app. I have done all the steps and I have added following code on viewWillAppear of my viewController, but it doesnt satisfy the condition canMakePay

I want to implement In App Purchase in my iPhone app.

I have done all the steps and I have added following code on viewWillAppear of my viewController, but it doesnt satisfy the condition canMakePayments and always executes the else part.

What could be wrong?

if ([SKPaymentQueue canMakePayments]) {
    NSLog(@"Parental-controls are disabled");

    SKProductsRequest *productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithObject:@"com.dev.InAppTry"]];
    productsRequest.delegate = self;
    [productsRequest start];
} else {
    NSLog(@"Parental-con开发者_高级运维trols are enabled");
}


Try to disable Parental Control in setting in Device.

Setting --> General --> Restrictions.

Do Disable Restriction or In Allowed Content section : Make In app purchase=ON.

Let me know if this helps you.

0

精彩评论

暂无评论...
验证码 换一张
取 消