如何测试SKPaymentTransactionStateDeferred? [英] How to test SKPaymentTransactionStateDeferred?

查看:2220
本文介绍了如何测试SKPaymentTransactionStateDeferred?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

iOS 8即将推出。我们有Xcode beta 6 atm,但仍然找不到关于如何正确测试家庭共享的任何文档(或者我错过了什么?)。我的问题是如何正确设置沙盒与父/子?我试图让它在测试版1中工作而没有快乐。

iOS 8 will be rolling out soon. We have Xcode beta 6 atm, but still cannot find any docs on how to properly test Family Sharing (or did I miss something?). My question is how to properly setup Sandbox with parent/child? I tried to make it work in beta 1 without joy.

任何提示人员?

更新:

Apple开发者论坛上的两个相关故事:

Two related stories on Apple Developer Forum:


  1. 如何在iTunes Connect上创建子沙盒帐户?( https://devforums.apple.com/message/1030357#1030357

  2. 在沙箱中测试要求购买( https:// devforums.apple.com/message/1005569#1005569

  1. How to create a children sandbox account on iTunes Connect?(https://devforums.apple.com/message/1030357#1030357)
  2. Testing "Ask to Buy" in sandbox (https://devforums.apple.com/message/1005569#1005569)


推荐答案

我我已经在这个话题上取得了一些进展,所以我想我会报道。另外,我发现了一个明显的错误,我已向苹果公司报告。

I've made a little headway on this topic, so thought I'd report in. Plus, I've found an apparent bug, which I've reported to Apple.

我所做的是以下内容:

1)在iTunes Connect中创建一个父测试(沙盒)帐户,并创建一个子测试帐户。这些只是iTunes Connect中的两个测试帐户。称父母和孩子为P和C.

1) Create a parent test (sandbox) account in iTunes Connect, and create a child test account. These are really just two test accounts in iTunes Connect. Call them P and C for parent and child.

2)使用这两个帐户,转到 https:// appleid。 apple.com 并改变他们的年龄。 iTunes Connect不允许您这样做。出于某种原因,除非年龄确实有一年,否则家庭共享的过程不起作用。我发现您必须在 https://appleid.apple.com 。奇。我将P设置为较旧(某些成人年龄),将我的C设置为较年轻。

2) With both accounts, go to https://appleid.apple.com and change their year for their age. iTunes Connect doesn't let you do this. For some reason, the process with family sharing doesn't work unless ages do have a year. I've found that you have to do the selection twice on the year list at https://appleid.apple.com. Odd. I set my P as older (some adult age) and my C as younger.

3)在一台Apple设备(我的iPhone,运行iOS8)上,我设置了家庭共享在P>帐户的设置> iCloud下。我使用我的真实iTunes Apple Id(具有我的付款信息)在此设备上登录iTunes。

3) On one apple device (my iPhone, running iOS8), I setup family sharing under Settings > iCloud for the P account. I'm signed into iTunes on this device with my real iTunes Apple Id (which has my payment info).

4)然后我邀请我的C apple id参与其中我的家人,在设置> iCloud下。

4) I then invite my C apple id to be part of my family, under Settings > iCloud.

5)我接受P的邀请(在我的iPad上,也运行iOS8),这涉及到登录iCloud其他设备为C.

5) I accept the invitation from P (on my iPad, also running iOS8), which involves signing into the iCloud on that other device as C.

6)在我的iPhone上,我为C家庭成员打开要求购买。

6) On my iPhone, I turn on "Ask To Buy" for the C family member.

现在,我已经准备好在我的沙盒应用上尝试购买测试版。在我的应用程序商店中执行常规流程后,我收到以下警告:

Now, I'm ready to try a test purchase as C on my sandboxed app. After I go through the regular process in my app's store I get the following alert:

当我点击询问时,我收到下一个提示:

when I tap on "Ask", I get the next alert:

现在,我尝试了两种选择,单独购买。我尝试过确定选项,该选项应该向P帐户发送通知。我还没有在我的P帐户上收到这样的通知(仍然在我的iPad上登录iCloud)。

Now, I've tried two options, with separate purchases. I've tried the "OK" option, which should send a notification to the P account. I have yet to receive such a notification on my P account (still signed into iCloud as that on my iPad).

我还试过亲自批准 儿童iPad上的选项。我使用P账户,如果在下一个提醒中我输入:

I've also tried the "Approve in Person" option on the "child"s iPad. I use the P account, and I enter in that if on the next alert:

之后我没有收到任何错误,所以看起来似乎是人事审批,但我还没有该购买转换为SKPaymentTransactionStatePurchased状态。所有延期购买仍然在应用程序的支付队列中,每个都具有状态SKPaymentTransactionStateDeferred。当我重新启动应用程序时,仍然在队列中的每次购买的状态都会延迟。

I get no error after that, so it would seem the Approve In Person worked, but I have yet to have that purchase convert to SKPaymentTransactionStatePurchased state. All of the deferred purchases are still in the payment queue of the app, each with the state SKPaymentTransactionStateDeferred. When I restart the app, the state of each purchase, still in the queue, is deferred.

接下来,我想知道特定测试iTunes帐户是否存在问题对于C,所以我做了第二个子帐户,称之为C2,并试图在我的iPhone上将其建立为P下的孩子。但是,我在那里遇到了另一个问题。我收到警报(在iPad上),当我尝试接受邀请成为P下C2的家庭成员时:

Next, I wondered if there was some problem with the particular test iTunes account for C, so I made a second child account, call that C2, and tried to establish it as a child under P on my iPhone. However, I run into a further problem there. I get the alert (on the iPad), when I try to accept the invitation to be a family member under P for C2:

对我来说,iCloud帐户的此限制不适用于测试帐户。这是我向Apple报告的明显错误。

To me, this limitation on iCloud account shouldn't apply to test accounts. This is the apparent bug I've reported to Apple.

因此,总而言之,我还不是100%确信我的SKPaymentTransactionStateDeferred实现正在运行。我们将看看Apple是否会回复我。

So, in summary, I'm not yet 100% convinced that my SKPaymentTransactionStateDeferred implementation is working. We shall see if Apple gets back to me.

这篇关于如何测试SKPaymentTransactionStateDeferred?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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