从 App Store 为 IAP 请求产品时出现错误 [英] I am getting error while requesting products from App Store for IAP

查看:18
本文介绍了从 App Store 为 IAP 请求产品时出现错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 IOS6 中,我成功地在我的应用中进行了应用内购买.

In IOS6, I was successfully making in-app purchases in my app.

我下载了 IOS/和 Xcode 5 Beta 并尝试打开同一个项目.

I downloaded IOS/ and Xcode 5 Beta and tried to open the same project.

我从应用商店获取产品的代码是:

My code to get products from app store is:

- (void)requestProductsWithIdentifiers:(NSSet*)identifiers
{
        @synchronized(self)
    {
            DebugLog(@"requesting products with identifiers: %@", identifiers);

            self.productsRequest = [[SKProductsRequest alloc] initWithProductIdentifiers:identifiers] ;
            self.productsRequest.delegate = self;
            [self.productsRequest start];
    }
}

但它返回一个错误:

[IAPHelper request:didFailWithError:](114): request did fail with error: <SKProductsRequest: 0xb846a10> / Error Domain=SSErrorDomain Code=2 "Cannot connect to iTunes Store" UserInfo=0xb846b10 {NSLocalizedDescription=Cannot connect to iTunes Store}

问题出在哪里?

推荐答案

Apple 阻止测试应用内购买...

Apple blocked testing in-app purchases...

这是发行说明的链接https://developer.apple.com/library/content/releasenotes/DeveloperTools/RN-Xcode/Chapters/Introduction.html#//apple_ref/doc/uid/TP40001051-CH1-SW578

请参阅:iOS 模拟器部分

See: iOS Simulator section

StoreKit(应用内购买)在模拟器中不起作用.13962338

StoreKit (In-App purchases) will not work in the Simulator. 13962338

好难过……

这篇关于从 App Store 为 IAP 请求产品时出现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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