xcode 您目前无权在 Sandbox 中购买此 InApp

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/32133212/
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-09-15 07:42:36  来源:igfitidea点击:

You are not authorized to make purchases of this InApp in Sandbox at this time

iosxcodein-app

提问by DiDinko

I'm trying to make in-app (non-consumable) in my app.

我正在尝试在我的应用中制作应用内(非消耗品)。

I'm trying to buy the package but I can't...

我想买这个包裹,但我不能...

Of course, I've looked here for answer, but I have one actual account everywhere - at developer.apple.com - also I've created provisioning profiles, at itunesconnect.apple.com and in Xcode as well...

当然,我已经在这里寻找答案,但我在任何地方都有一个实际帐户 - 在 developer.apple.com - 我还在 itunesconnect.apple.com 和 Xcode 中创建了配置文件......

My bundle identifier is the same across the all websites and application.

我的捆绑标识符在所有网站和应用程序中都是相同的。

The Application finds my package and show me the price of it. When I click on BUY the alert view show the text:

应用程序找到我的包裹并向我显示它的价格。当我点击购买时,警报视图显示文本:

You are not authorized to make purchases of this InApp in Sandbox at this time.

[Environment: Sandbox]

您目前无权在 Sandbox 中购买此 InApp。

[环境:沙盒]

Any ideas please?

请问有什么想法吗?

采纳答案by Tu?rul ?zdemir

You can use In-App purchase test users, to test In-App purchase in sandbox mode. Create this users from users section of itunesconnect.apple.com (link)

您可以使用应用内购买测试用户,在沙盒模式下测试应用内购买。从 itunesconnect.apple.com 的用户部分创建此用户(链接

Before testing In-App purchase, Do logout your real apple id from Settings app and don't login with test user from here or AppStore.

在测试应用内购买之前,请务必从“设置”应用中注销您的真实 Apple ID,不要使用此处或 AppStore 的测试用户登录。

回答by FranticRock

They used to have the real iTunes login and the Sandbox iTunes login grouped back in 2017. So you would sign in to your Sandbox account while testing purchases in the app, and then it would change your iTunes login as well. Then you'd have to sign out of your iTunes through settings. Now they have a separate field on the bottom of the Settings --> Itunes & App Stores screen (called "Sandbox Account"). You have to sign in there with a provisioned Sandbox account which is added in "Users & Access" in App Store Connect. (You have to also verify that email address, and it can not use a +postfix on the email address, IF that email is used as one of your non-sandbox main accounts... Sigh...) So you have to actually create new unique emails now that are not used as part of your main accounts. (From my understanding you can still use +postfixes on your emails which are only used for sandbox accounts though :)

他们曾经在 2017 年将真正的 iTunes 登录名和 Sandbox iTunes 登录名归为一组。因此,您可以在测试应用程序中的购买时登录您的 Sandbox 帐户,然后它也会更改您的 iTunes 登录名。然后您必须通过设置退出您的 iTunes。现在,他们在设置 --> iTunes 和 App Stores 屏幕底部有一个单独的字段(称为“沙盒帐户”)。您必须使用在 App Store Connect 的“用户和访问”中添加的预配 Sandbox 帐户登录那里。(您还必须验证该电子邮件地址,并且它不能在电子邮件地址上使用 + 后缀,如果该电子邮件被用作您的非沙盒主帐户之一......叹气......)所以你必须实际上现在创建新的独特电子邮件,这些电子邮件不用作您的主要帐户的一部分。

Now, there's still a bug with purchases where If you are not signed in with your main Itunes account, OR your sandbox account, and you try to test purchases by typing in a sandbox account (in the app), it will keep asking you for your Sandbox Email / Password over and over again, Until you type in your REAL iTunes account as well (????). That works (typing in both the sandbox account and the real itunes account). Then the sandbox purchase goes through. I'm as surprised as you are...

现在,购买仍然存在一个错误,如果您没有使用您的主 Itunes 帐户或您的沙箱帐户登录,并且您尝试通过输入沙箱帐户(在应用程序中)来测试购买,它会不断询问您一遍又一遍地输入您的沙盒电子邮件/密码,直到您也输入您的真实 iTunes 帐户 (????)。这有效(同时输入沙箱帐户和真实的 iTunes 帐户)。然后沙盒购买通过。我和你一样惊讶...

回答by Amal T S

If your apple account has a sandbox account user, after logging in with your account, follow these steps

如果你的苹果账户有沙盒账户用户,用你的账户登录后,按照以下步骤操作

Step 1 :Go to settings.

第 1 步:转到设置。

Step 2 :Select iTunes & Settings

第 2 步:选择 iTunes 和设置

Step 3 :Scroll to the bottom. There is a section for SANDBOX ACCOUNT

第 3 步:滚动到底部。有一个沙盒账户部分

Step 4 :Sign in there using your Sandbox account

第 4 步:使用您的 Sandbox 帐户登录

Now test your app & it will work fine.

现在测试您的应用程序,它会正常工作。

enter image description here

在此处输入图片说明

回答by shanshan.sun

First,make sure the account of your in test app is right. Second,when you are working in the app,click the recharge button,and input the right account for testing.

首先,确保您的测试应用程序的帐户是正确的。其次,当您在应用程序中工作时,单击充值按钮,并输入正确的帐户进行测试。