EDIT3后productRequest响应:解决InAppPurchase停止接收删除并重新安装应用程序
inAppPurchase不会对越狱设备上工作! (至少在沙盒测试)
EDIT2:现在我知道为什么反应没有得到通过:这是对iPhone的网络故障。 当网络连接启动但没有通过任何数据时,productRequest永远不会得到响应。
同时我仍然收到无效的产品ID。任何帮助?
编辑:更新:试图增加新的测试用户帐户,并使用他们(和删除/过重新安装应用程序,在我现在得到无效的产品...)什么是错后?少了什么东西?
我试图实施inAppPurchase系统,这是一个痛苦!
的愈来愈无效的产品ID的后,我通过following list去:
[选中]是否启用应用内购买你的App ID?
[检查]您是否检查了您的产品的清仓待售?
[检查]您是否已提交(并可选择拒绝)您的应用程序二进制文件?
[检查]您的项目的.plist软件包ID是否与您的App ID匹配?
[检查]您是否为新App ID生成并安装了新的供应配置文件?
[检查]您是否使用此新配置文件将项目配置为代码签名?
[检查]您是否为iPhone OS 3.0或以上版本?
[已检查]制作SKProductRequest时是否使用完整产品ID?
[CHECKED - a week now]自从将产品添加到iTunes Connect后,您是否等了几个小时?
[已检查 - 收到的付款]您的银行信息是否在iTunes Connect上处于活动状态? (via Mark)
[这是问题出现的地方]您是否尝试从设备中删除应用程序并重新安装?(通过Hector,S3B,Alex O,Joe和Alberto)
---->现在代表似乎不工作.... ??我没有得到我的@“didReceiveResponse”在控制台上,但我得到了@“点击和处理”(下面的代码)
@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
正如人有此之前?谢谢!