在应用内购买 - 可以获取产品信息,但无法连接到 iTunes 进行购买
我正在尝试让“应用程序内购买”在我的 iPhone 应用程序中运行。
我在 itunes connect 中创建了一些产品和一些测试帐户。
我可以毫无问题地检索产品数据(价格等..),但是当我尝试付款时 - 我被要求登录 - 我使用测试帐户 ->交易总是失败并出现以下错误:
failedTransaction with error:Error Domain=SKErrorDomain Code=2 "Connexion à l'iTunes Store isn't possible" UserInfo=0x65d02a0 {NSLocalizedDescription=Connexion à l'iTunes Store isn't possible}
我尝试了多种产品并进行了测试帐户(即使在像我们这样的其他商店),但我仍然遇到同样的错误...
注意:我认为我第一次尝试时效果很好,但从来没有仍然
欢迎任何想法!
谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
对我来说,我只是仔细检查我的代码,直到发现我的错误。我确信一切都很好,但事实并非如此。当我向商店请求产品信息时,我使用了正确的产品标识符:
但是,当我创建付款时,我使用了错误的产品标识符:
尽管使用产品标识符进行付款并不是正确的方法,但它可以让你做到这一点。最好使用 SKProduct 对象。 (我之前在代码中设置了 fullProduct 属性:
我绝对确定商店已关闭,这就是问题所在。但第二天我决定从流程的开头开始,如 http://developer.apple.com/library/ios/#technotes/tn2259/_index .html,这是我发现问题所在的产品标识符。
For me, I just scoured my code until I found my mistake. I was so certain everything was fine, but it was not. When I requested product information from the store, I used the correct Product Identifier:
However, when I went to create the payment, I used the incorrect Product Identifier:
Using the product Identifier for the payment is not the correct way to do it, although it allows you to do it. It is better to use an SKProduct object. (I had set the fullProduct property earlier in the code:
I was absolutely certain that the store was down, and that was the problem. But the next day I decided to start from the beginning of the process, as described in http://developer.apple.com/library/ios/#technotes/tn2259/_index.html. This is when I found that my incorrect Product Identifier was the problem.
查看此线程。看来是沙盒的问题。很多人都遇到这个问题
- iPhone storekit 沙盒停止工作
Check out this thread. It seems to be a problem with the Sandbox. Lot's of people having this issue-
iPhone storekit sandbox stopped working
我也有同样的症状,就我而言,问题是我有一个与真实 Apple ID 帐户同名的测试用户帐户。我通过创建不同的测试用户帐户解决了该问题。
I had the same symptoms and in my case the problem was that I had a test user account with the same name as a real Apple ID account. I resolved the problem by creating a different test user account.