【问题标题】:SKProductsRequest Returning Empty ResultsSKProductsRequest 返回空结果
【发布时间】:2013-03-04 15:01:35
【问题描述】:

我查看了其他一些答案,但它们似乎对我的情况没有帮助。我有一个新应用程序,它的初始版本几乎已准备好,我正在处理应用程序内购买部分。我在以前的应用程序中使用过 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];
}

我似乎没有得到任何返回的结果。我检查了身份证,他们似乎没问题;我也通过 Xcode 从我的 iPhone 设备运行,但仍然没有运气。调试器中的响应也不会泄露太多。

谁能建议一些解决这个问题的方法?

【问题讨论】:

    标签: ios xcode ios5 in-app-purchase


    【解决方案1】:

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

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

    【讨论】:

    • @ORStudios - 你能详细说明这个答案吗?产品标识符应与 iTunes Connect 中显示的标识符相匹配。通常像这个 com.companyname.appname.iapreference - 我有同样的问题,但不确定它是否相关,因为答案对我来说没有意义。谢谢
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-09-15
    • 2021-05-01
    • 2017-08-25
    • 2013-09-27
    相关资源
    最近更新 更多