在iOS 5和iOS 6上购买InApp [英] InApp purchase on iOS 5 vs iOS 6

查看:118
本文介绍了在iOS 5和iOS 6上购买InApp的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在测试我的应用的新版本,其中包括在下次更新中的应用内购买,为期一个月。

I've been testing the new version of my app, which will include an in-app purchase in the next update, for one month.

一切正常在iOS 6和5上都有,但最近我开始从我从iOS 5发出的请求中得到一个空的 SKProduct s数组。

Everything worked fine both on iOS 6 and 5, but recently I'm starting to get an empty SKProducts array back from the requests I make from iOS 5.

奇怪的是,通过在iOS 6上执行相同的应用程序,我得到了正确的产品数组,其中包含我在iTunes连接中设置的所有元素。

The strange thing is that, by executing the same application on iOS 6, I get the correct products array with all the elements I've set up in iTunes connect.

任何人有同样的问题?它可以是什么?

Anyone having the same problem? What can it be?

推荐答案

您使用Jail Break设备进行测试,不是吗?
您可以将此添加到productsRequest方法以检查无效标识符

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;


}

关注此帖子
< a href =http://troybrant.net/blog/2010/01/in-app-purchases-a-full-walkthrough/ =nofollow> http://troybrant.net/blog/2010/01 /应用内购买 - 完整演练/

这篇关于在iOS 5和iOS 6上购买InApp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆