【问题标题】:IAP doesn't work on Real iPadIAP 不适用于 Real iPad
【发布时间】:2013-01-20 11:24:58
【问题描述】:

当我在模拟器中运行以下代码时,它可以成功获取 IAP 信息,但是当它在真正的 IPAD 上运行时,“count”总是 = 零......任何想法有什么问题吗?谢谢。

// Store Kit returns a response from an SKProductsRequest.
- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {

// Populate the removeAdsButton button with the received product info.
SKProduct *validProduct = nil;
int count = [response.products count];
if (count>0) {
    validProduct = [response.products objectAtIndex:0];
}
if (!validProduct) {
    [removeAdsButton setTitle:@"No Products Available" forState:UIControlStateNormal];
    removeAdsButton.enabled = NO;
    return;
}

NSString *buttonText = [[NSString alloc] initWithFormat:@"%@ - Buy $%@", validProduct.localizedTitle, validProduct.price];
[removeAdsButton setTitle:buttonText forState:UIControlStateNormal];
removeAdsButton.enabled = YES;
[buttonText release];
}

【问题讨论】:

  • 我有一个想法,是不是因为这个IAP还没有通过,所以在真机上不行??

标签: xcode cocoa-touch ios5 in-app-purchase


【解决方案1】:

我发现如果设备是JB的话就不行了..

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-03-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-11-02
    • 1970-01-01
    相关资源
    最近更新 更多