0

シミュレーターで次のコードを実行すると、IAP情報を正常に取得できますが、実際のIPADで実行すると、「カウント」は常にゼロになります。ありがとう。

// 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];
}
4

1 に答える 1

1

デバイスがJBの場合、動作しないことがわかりました..

于 2013-02-06T10:59:28.663 に答える