ios 如何通过 Apple TestFlight 测试应用内购买?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27734090/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 04:12:15  来源:igfitidea点击:

How to test In App Purchases through Apple TestFlight?

iosin-app-purchaseapp-store-connecttestflight

提问by Tom

I uploaded my first app to iTunes Connect (iOS 8, iPhone) and it's now available through Apple TestFlight for internal and external testers. I created a Non-Consumablein app purchase for it and would like to test it. How can I add it to my beta app? I'm getting this message in iTunes Connect:

我将我的第一个应用程序上传到 iTunes Connect(iOS 8、iPhone),现在它可以通过 Apple TestFlight 供内部和外部测试人员使用。我为它创建了一个非消耗品的应用程序购买并想测试它。如何将其添加到我的 Beta 版应用程序中?我在 iTunes Connect 中收到此消息:

Your first In-App Purchase must be submitted with a new app version. Select it from the In-App Purchase section in Version Details and click Submit.
You do not currently have a iOS Paid Apps contract in effect. If this In-App Purchase was submitted with your app, then your app will not be available on the App Store until your contract goes into effect. Legal, Admin, and Finance users can go to the Agreements, Tax, and Banking module in iTunes Connect to view your contract status.

您的第一个应用内购买必须与新的应用版本一起提交。从“版本详细信息”的“应用内购买”部分中选择它,然后单击“提交”。
您目前没有有效的 iOS 付费应用合同。如果此应用内购买与您的应用一起提交,则在您的合同生效之前,您的应用将无法在 App Store 上使用。法律、行政和财务用户可以前往 iTunes Connect 中的协议、税务和银行模块查看您的合同状态。

采纳答案by Hashmat Khalil

you can test in-app purchase with test account.

您可以使用测试帐户测试应用内购买。

go to itunes connect -> Users and Roles --> Sandbox Testers

then create an account for testing your in app purchase.

转到 iTunes 连接 -> 用户和角色 -> 沙盒测试员

然后创建一个帐户来测试您的应用内购买。

when test in app purchase try to logout from app store which uses your real account. then it will ask for itunes account while in testing in app purchase then enter your test account credentials.

在应用程序购买中进行测试时,请尝试从使用您的真实帐户的应用程序商店注销。然后它会在测试应用程序购买时询问itunes帐户,然后输入您的测试帐户凭据。

回答by Dan Rosenstark

TestFlight users don't require a sandbox account, but they will test against an automatically created sandbox account.

TestFlight 用户不需要沙箱帐户,但他们将针对自动创建的沙箱帐户进行测试。

Sandbox Accounts

The moment a tester opens your application, a sandbox account is created for them. This means it's no longer necessary to create test accounts in iTunes Connect. Testing In-App Purchases was never easier.

沙盒帐户

测试人员打开您的应用程序的那一刻,就会为他们创建一个沙箱帐户。这意味着不再需要在 iTunes Connect 中创建测试帐户。测试应用内购买从未如此简单。

Source

来源



Note that your TestFlight user isa legitimate App Store user. That user will be purchasing, restoring, etc. from the IAP in the Sandbox as opposed to the real IAP.

请注意,您的 TestFlight 用户合法的 App Store 用户。该用户将从沙盒中的 IAP 购买、恢复等,而不是真正的 IAP。

On iTunes Connect, the IAP can be "Approved" or "Ready to Submit" (or any other status, I think).

在 iTunes Connect 上,IAP 可以是“已批准”或“准备提交”(或任何其他状态,我认为)。

回答by iHTCboy

English

英语

Testers - TestFlight - Apple Developer

测试人员 - TestFlight - Apple Developer

Each build is available to test for up to 90 days, starting from the day the developer uploads their build. You can see how many days you have left for testing in the app's details page in TestFlight. TestFlight will notify you each time a new build is available and will include instructions on what you need to test.

All in-app purchases are free during the testing period.

从开发人员上传其构建之日起,每个构建都可以进行长达 90 天的测试。您可以在 TestFlight 的应用程序详细信息页面中查看剩余的测试天数。每次有新版本可用时,TestFlight 都会通知您,并包含有关您需要测试的内容的说明。

在测试期间,所有应用内购买都是免费的。

中文

中文

测试员 - TestFlight - Apple Developer

测试员 - TestFlight - Apple Developer

从开发者上传的那一天起,每个构建版本可被测试长达 90 天。您可以在 TestFlight 的 app 详细信息页面上查看可供测试的剩余天数。

在测试期间,所有 App 内购买项目都是免费的.

从每天上传的那一天起,构建版本可被测试90天。您可以在TestFlight的应用程序详细信息页面上查看测试的开发天数。

在测试期间,所有应用内购买项目都是免费的。

回答by badweasel

Testing IAP is going to require a test user that you create under iTunes connect. Plus code in you app to implement IAP. Then to test it you "purchase" the item from within the app, under the sandbox, using that user id.

测试 IAP 将需要您在 iTunes 连接下创建的测试用户。在您的应用程序中添加代码以实现 IAP。然后为了测试它,您使用该用户 ID 从应用程序内的沙箱下“购买”该项目。

As far as I know TestFlight is no different than testing the IAP on your device by building directly to your device.

据我所知,TestFlight 与通过直接构建到您的设备来测试您设备上的 IAP 没有什么不同。

I'm assuming that you didn't just add the IAP bundle id and expect it to do something.

我假设您不只是添加 IAP 捆绑包 ID 并期望它执行某些操作。

If you have not added code to support IAP, that answer is non-trivial within the scope of a SE answer. Google IAP tutorial. There are lots of good ones out there.

如果您尚未添加代码来支持 IAP,那么该答案在 SE 答案的范围内是重要的。谷歌 IAP 教程。那里有很多好的。