Error in In App Purchase: Parental Controls are enabled
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.
精彩评论