我想在我的iPhone应用程序中实现应用程序购买。
我已经完成了所有的步骤,并在我的viewController的viewWillAppear上添加了以下代码,但它不满足条件canMakePayments
,总是执行else
部件。
会出什么问题呢?
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-controls are enabled");
}
发布于 2011-06-28 09:00:33
尝试在设备的设置中禁用家长控制。
设置-->常规-->限制。
禁用限制或在允许的内容部分: Make In app purchase=ON。
如果这对你有帮助,请告诉我。
https://stackoverflow.com/questions/6503897
复制