【问题标题】:iOS in-app SKProduct not showing up on iphone but does in simulatoriOS 应用内 SKProduct 未显示在 iphone 上,但在模拟器中显示
【发布时间】:2012-01-28 06:07:40
【问题描述】:

正如标题所示, 当请求 SKProducts 列表并从模拟器运行时,我会得到正确的数组,但是在实际的 iphone 上,数组将包含 0 个项目。

NSSet *productSet = [NSSet setWithObject:@"com.somewebsite.someapp.inappproduct"];
SKProductsRequest *pr = [[SKProductsRequest alloc]initWithProductIdentifiers:productSet];
pr.delegate = self;
[pr start];
[[SKPaymentQueue defaultQueue] addTransactionObserver:self];


#pragma mark - purchasing
- (void)productsRequest:(SKProductsRequest *)request 
     didReceiveResponse:(SKProductsResponse *)response 
{
    NSLog(@"response = %@",response.products);
    if (response.products.count > 0)
    {
        self.products = response.products;
        [thetable insertSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationFade];
    }
}

【问题讨论】:

  • 它在模拟器中不起作用。
  • 它适用于我的模拟器
  • 您需要确保对于设备,您使用的是在 itunesconnect 应用程序中注册的正确捆绑标识符。这可能是最强有力的原因。

标签: iphone xcode simulator


【解决方案1】:

如果它在模拟器上可以工作(不知道怎么做??)但在手机上不行..那么问题只能在您的设备越狱时解释。

http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/

点击上面的链接并包含无效产品标识符的 NSLog.. 如果你得到那个日志。网站提供它发生的各种情况,这样你就可以解决 tim

【讨论】:

  • 问题是越狱!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2017-04-04
  • 2013-05-13
  • 1970-01-01
  • 2016-04-10
  • 2011-05-28
  • 2018-08-17
  • 1970-01-01
相关资源
最近更新 更多