ios - SKProductsRequest 返回空结果

标签 ios xcode ios5 in-app-purchase

我查看了其他一些答案,它们似乎对我的情况没有帮助。我有一个新的应用程序几乎准备好首次发布,我正在处理应用程序内购买部分。我在以前的应用程序中使用过 IAP,所以我认为转移应该很简单。然而,问题是每当我运行 SKProductsRequest 时,它都会返回一个空结果集。

我正在使用以下内容来发出请求

productIdentifierList = [[NSMutableArray alloc] init];
[productIdentifierList addObject:[NSString stringWithFormat:@"xxxxxxxxxx"]];

SKProductsRequest *request = [[SKProductsRequest alloc] initWithProductIdentifiers:[NSSet setWithArray:productIdentifierList]];

响应转到

-(void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {
    NSLog(@"Recieved Product Response %@",response.products);
    [productDetailsList addObjectsFromArray: response.products];
    [productDisplayTableView reloadData];
}

我似乎没有得到任何返回结果。我已经检查了 ID,它们似乎没问题;我也通过 Xcode 从我的 iPhone 设备运行,但仍然没有成功。调试器中的响应也不会给出太多信息。

有人可以针对此问题提出一些修复建议吗?

最佳答案

事实证明,在新版本的 IOS 中,您不再需要输入应用程序的完整 ID,然后再输入 iap id。而只是输入 iap id。

[productIdentifierList addObject:[NSString stringWithFormat:@"iap_id"]];

关于ios - SKProductsRequest 返回空结果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15204511/

相关文章:

iOS5 将图像保存到自定义文件夹,ALAssetsLibrary 失败

objective-c - 如何在 iOS 上运行单独的进程

iphone - 垃圾效果 iOS

ios - 在 iPad 上 : UITableView's separator between header and cells

xcode - 在 App Store 之外分发 Mac 应用程序。我应该怎么签?

ios - 正在创建 UIViewControllers 但未在状态恢复中显示

c - 向 Xcode 添加头文件

ios - CATextLayer 中的 NSAttributedString 导致 EXC_BAD_ACCESS (ios 5.0)

ios - iOS 中具有大小等级的自定义字体

ios - 图像大小与屏幕大小成比例