iOS7 xCode5如何解决“无效产品ID”适用于2014年的应用内购买? [英] iOS7 xCode5 how to resolve "invalid product ID" for in app purchases in 2014?

查看:151
本文介绍了iOS7 xCode5如何解决“无效产品ID”适用于2014年的应用内购买?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的某个应用中实施应用内购买,并且遇到一个问题,即当我发送沙盒测试的产品请求时,我没有返回任何产品。我看到很多很老的帖子,比如这个帖子(



当我创建时结果iTunesConnect中的产品,我称之为产品,当它应该是com.mysite.product




I'm trying to implement in-app purchases in one of my apps, and have an issue where I get no products returned when I send a product request for sandbox testing. I see a lot of very old posts, like this one (invalid product id from 2010). What am I doing wrong with my in app purchase setup? Is there any recent tutorials on how to configure xCode5 to use in app purchasing?

- (void)requestProUpgradeProductData
{

    NSSet *productIdentifiers = [NSSet setWithObject:self.productID ];
    productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:productIdentifiers];
    productsRequest.delegate = self;
    [productsRequest start];

    // we will release the request object in the delegate callback
}

Here's the callback for the product request:

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

    NSArray *products = response.products;

    for(id object in products)
    {
//handle valid products
    }

    for (NSString *invalidProductId in response.invalidProductIdentifiers)
    {
        NSLog(@"Invalid product id: %@" , invalidProductId);
    }
    [hud hide:YES];

}

Using this option created a duplicate app id with the same number, but different name on hte developer portal. I cannot delete that app ID.

This is the first consumable in app purchase, no need to host content. The app is in "ready to upload binary stage". It has been over 24 hours since I created the in app purchase via itunesconnect

解决方案

Found a solution here:

http://www.raywenderlich.com/21081/introduction-to-in-app-purchases-in-ios-6-tutorial

Turns out when I created the product in iTunesConnect, I called it "product", when it should've been "com.mysite.product"

这篇关于iOS7 xCode5如何解决“无效产品ID”适用于2014年的应用内购买?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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