SKErrorUnknown在测试应用内购买时 [英] SKErrorUnknown while testing in-app purchase
问题描述
我正在努力为项目实施应用内购买,除了实际测试购买之外一切顺利:
- 我在iTunes中创建了应用程序(唯一ID,提交二进制文件,然后拒绝它,因为这是不是最后一个)
- 创建了应用程序内购买物品
- 实现了代码
- 创建了测试帐户
I am working to implement in-app purchase for a project and everything went well except the actual test purchase: - I created the app in iTunes (unique ID, submited a binary, then rejected it because this is not the final one) - created the in-app purchase items - implemented the code - created the test account
什么正在工作:
- 我从商店获得了一个有效的产品
- 我得到了确认你的订阅...弹出窗口
- 我得到了分享你的信息...弹出窗口
- 然后我收到了这个错误:Code = 0无法连接到iTunes Store(SKErrorUnknown)
What is working: - I got a valid product from store - I got the "Confirm your subscription..." popup - I got the "Share your information ..." popup - and then i got this error: Code=0 "Cannot connect to iTunes Store" (SKErrorUnknown)
有没有人对此有任何想法? (我一直在Google上搜索两天......似乎没什么用。)
Does anyone have any idea on this one ? (I've been googling for two days ... and nothing seems to work).
谢谢。
推荐答案
我认为我发现了我的问题:我的应用程序仅针对罗马尼亚启用,我的测试用户已针对罗马尼亚本地化 - 并且此设置无效。
I think I've found my problem:my app was enabled only for Romania, my test user was localized for Romania - and with this setup does not work.
我启用了美国的应用程序并创建了一个本地化在美国的测试用户,它似乎工作(根本没有代码更改)。我认为这证明代码没问题,只是苹果沙箱与非美国测试用户有一些问题。
I've enabled the app for USA and created a test user localized in USA and it seems to work (no code change at all). And I think that proves that the code is ok, just the apple sandbox has some problems with non USA test users.
这篇关于SKErrorUnknown在测试应用内购买时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!