InApp purchase on iOS 5 vs iOS 6

扶醉桌前 提交于 2019-12-06 12:03:28

You used Jail Break device to test, didnt u? You can add this to productsRequest method to check the invalid identifier

- (void)productsRequest:(SKProductsRequest *)request didReceiveResponse:(SKProductsResponse *)response {

    NSLog(@"Loaded list of products...");
    _productsRequest = nil;

    NSArray * skProducts = response.products;
    NSLog(@"Number of products: %d", [skProducts count]);
    for (SKProduct * skProduct in skProducts) {
        NSLog(@"Found product: %@ %@ %0.2f",
              skProduct.productIdentifier,
              skProduct.localizedTitle,
              skProduct.price.floatValue);
    }
    for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Invalid product id: %@" , invalidProductId);
    }

    _completionHandler(YES, skProducts);
    _completionHandler = nil;


}

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!