InAppPurchase 删除并重新安装应用程序后停止接收 productRequest 响应 [英] InAppPurchase stop receiving the productRequest response after deleting and reinstalling app

查看:23
本文介绍了InAppPurchase 删除并重新安装应用程序后停止接收 productRequest 响应的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

解决

inAppPurchase 不适用于越狱设备!(至少是沙盒测试)

inAppPurchase doesn't work on jailbreak devices! (at least the sandbox testing)

现在我知道为什么没有得到响应:这是 iPhone 上的网络故障.当网络连接正常但未获取任何数据时,productRequest 永远不会得到响应.

Now I know why the response wasn't getting through: It was a network malfunction on the iPhone. When the network connection is up but not getting through any data the productRequest never gets a response.

与此同时,我仍然收到无效的产品 ID.有什么帮助吗?

Meanwhile I'm still getting an invalid product ID. Any help?

更新:在尝试添加新的测试用户帐户并使用它们(并一遍又一遍地删除/重新安装应用程序后,我现在得到无效产品...)有什么问题?缺少什么?

Update: After trying adding new test user accounts and using them (and deleting/reinstalling the app over and over I now get Invalid Product...) What's wrong? What's missing?

我正在尝试实施 inAppPurchase 系统,但很痛苦!

I'm trying to implemente inAppPurchase system and it's been a pain!

在不断获得无效的产品 ID 之后,我浏览了以下列表:

After keep getting invalid product ID's I went through the following list:

[CHECKED] 您是否为您的 App ID 启用了应用内购买?

[CHECKED] Have you enabled In-App Purchases for your App ID?

[CHECKED] 您是否为您的产品勾选了 Cleared for Sale?

[CHECKED] Have you checked Cleared for Sale for your product?

[已检查] 您是否已提交(并可选择拒绝)您的应用程序二进制文件?

[CHECKED] Have you submitted (and optionally rejected) your application binary?

[CHECKED] 您项目的 .plist Bundle ID 是否与您的 App ID 匹配?

[CHECKED] Does your project’s .plist Bundle ID match your App ID?

[CHECKED] 您是否为新的 App ID 生成并安装了新的配置文件?

[CHECKED] Have you generated and installed a new provisioning profile for the new App ID?

[已检查] 您是否已将您的项目配置为使用此新配置文件进行代码签名?

[CHECKED] Have you configured your project to code sign using this new provisioning profile?

[已检查] 您是否为 iPhone OS 3.0 或更高版本构建?

[CHECKED] Are you building for iPhone OS 3.0 or above?

[CHECKED] 在提出 SKProductRequest 时,您是否使用了完整的产品 ID?

[CHECKED] Are you using the full product ID when when making an SKProductRequest?

[已检查 - 一周了] 自从将您的产品添加到 iTunes Connect 后,您是否等了几个小时?

[CHECKED - a week now] Have you waited several hours since adding your product to iTunes Connect?

[已检查 - 已收到付款]您的银行详细信息在 iTunes Connect 上是否有效?(通过马克)

[CHECKED - received payments] Are your bank details active on iTunes Connect? (via Mark)

[这就是问题出现的地方]您是否尝试从设备中删除该应用并重新安装?(通过 Hector、S3B、Alex O、Joe 和 Alberto)

[THIS is where the problem arised] Have you tried deleting the app from your device and reinstalling? (via Hector, S3B, Alex O, Joe, and Alberto)

----> 现在委托似乎不起作用....??我没有在控制台上得到我的@"didReceiveResponse",但我得到了@"clicked and processing"(下面的代码)

----> And now the delegate doesn't seem to work....?? I don't get my @"didReceiveResponse" on the console but i do get the @"clicked and handling" (Code below)

@implementation InAppHandler

- (void)requestProUpgradeProductData
{
    NSLog(@"clicked and handling");

    NSSet *productIdentifiers = [NSSet setWithObject:@"pastedFromiTunesConnect"];
    productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
    productsRequest.delegate = self;
    [productsRequest start];

    // we will release the request object in the delegate callback
}

#pragma mark -
#pragma mark SKProductsRequestDelegate methods

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response
{
    NSLog(@"didReceiveResponse");

    NSArray *products = response.products;
    proUpgradeProduct = [products count] == 1 ? [[products objectAtIndex:0] retain] : nil;
    if (proUpgradeProduct)
    {
        NSLog(@"Product title: %@" , proUpgradeProduct.localizedTitle);
        NSLog(@"Product description: %@" , proUpgradeProduct.localizedDescription);
        NSLog(@"Product price: %@" , proUpgradeProduct.price);
        NSLog(@"Product id: %@" , proUpgradeProduct.productIdentifier);
    }

    for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Invalid product id: %@" , invalidProductId);
    }

    // finally release the reqest we alloc/init’ed in requestProUpgradeProductData
    [productsRequest release];

    [[NSNotificationCenter defaultCenter] postNotificationName:kInAppPurchaseManagerProductsFetchedNotification object:self userInfo:nil];
}
@end

之前有人知道吗?谢谢!

As anyone got this before? Thanks!

推荐答案

inAppPurchase 在某些越狱设备上不起作用(似乎可能与 AppSync 有关)!(沙盒测试不起作用)

inAppPurchase doesn't work on some jailbreak devices (seems that can have something to do with AppSync)! (the sandbox testing doesn't work that is)

这篇关于InAppPurchase 删除并重新安装应用程序后停止接收 productRequest 响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆