ios 无法使用设备上的沙盒测试用户登录

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

Unable to log in with sandbox test users on device

iosin-app-purchaseapp-storeapp-store-connect

提问by Speckpgh

Trying to do some In App Purchase testing, so I created a sandbox tester on itunesconnect... but when I attempt to log in as that user on my device I get an error:

尝试进行一些应用内购买测试,所以我在 itunesconnect 上创建了一个沙盒测试器......但是当我尝试在我的设备上以该用户身份登录时,我收到一个错误:

Itunes Account creation not allowed

The Apple ID cannot be used with the iTunes store at this time. Please try again later.

不允许创建 Itunes 帐户

目前无法在 iTunes 商店中使用 Apple ID。请稍后再试。

If I put in the wrong password for the account I get an account rejection so its not a password typo.. this is happening for every test account I create... anyone have a clue what the hell is going on.. I cannot find any information on this anywhere.

如果我为该帐户输入了错误的密码,我会收到一个帐户拒绝,因此它不是密码输入错误.. 我创建的每个测试帐户都会发生这种情况......任何人都知道到底发生了什么......我找不到任何关于此的任何信息。

回答by Speckpgh

Yes, the answer is I AM AN IDIOT... pure and simple.

是的,答案是我是个白痴......纯粹而简单。

I was setting my user account in itunes login to these test accounts.. which invalidates them as test accounts because they try to legitimately log into itunes...

我正在将我的用户帐户在 iTunes 登录设置为这些测试帐户.. 这使它们作为测试帐户无效,因为他们试图合法地登录到 iTunes ......

You have to have your ITUNES/APPstore login EMPTY do not try to log in explicitly in the settings... LOG OUT of ITUNES/APP STORE so that no account is in the apple ID in settings and then just run your program.

您必须让您的 iTunes/APPstore 登录 EMPTY 不要尝试在设置中明确登录...退出 iTunes/APP STORE,以便设置中的 Apple ID 中没有帐户,然后只需运行您的程序。

I had properly done this, but then without reconsulting the documentation I went to change users, and saw that I had a test user in the UI of the settings (I guess it gets set by the software) so I attempted to just set it there, and was invalidating the accounts causing this problem.

我已经正确地做到了这一点,但是没有重新查阅文档我就去更改用户,并看到我在设置的 UI 中有一个测试用户(我猜它是由软件设置的)所以我试图将它设置在那里,并使导致此问题的帐户无效。

This is purely my mistake, but Apple could do a better job on the error this thing throws, and have the app store/itunes perhaps display something other than the test id, so if its been a week since or two since you set your test id and go to change it you don't just foolishly think you do it that way...

这纯粹是我的错误,但是 Apple 可以在这件事引发的错误上做得更好,并且让应用程序商店/iTunes 可能会显示测试 ID 以外的其他内容,因此如果自您设置测试以来已经过了一两周id 然后去改变它,你不会愚蠢地认为你这样做......

Anyway... you will likely need to delete all your sandbox testers if you did what I did as they will be invalid and then create new ones... and then remove the appstore/itunes login on your test device and try to run it....

无论如何......如果你做了我所做的,你可能需要删除你所有的沙箱测试员,因为他们将是无效的,然后创建新的......然后在你的测试设备上删除appstore/itunes登录并尝试运行它....

I admit this is documented, I did follow it the first time I used a test user, but forgot the next time I wanted to test.. which lead to this... fully my fault.. but I suspect I am not, nor will I be the only one to do this... which is why it's so odd I couldn't find anything else documented about this error anywhere.

我承认这是记录在案的,我第一次使用测试用户时确实遵循了它,但是下次我想测试时忘记了……这导致了这个……完全是我的错……但我怀疑我不是,也不是我会是唯一一个这样做的人吗...这就是为什么我在任何地方都找不到关于此错误的任何其他记录如此奇怪的原因。

Documentation for reference:

参考资料:

回答by Meilbn

In my case, just log out your real Apple ID, don't login sandbox tester Apple ID, then run your App, buy product, and system will showing a alert view to let you choose "Use Existing Apple ID" or "Create New Apple ID", of course choose first one, then login your sandbox tester Apple ID, and it's done.

在我的情况下,只需注销您的真实 Apple ID,不要登录沙盒测试员 Apple ID,然后运行您的应用程序,购买产品,系统将显示一个警报视图,让您选择“使用现有的 Apple ID”或“创建新的” Apple ID”,当然选择第一个,然后登录您的沙盒测试员Apple ID,就完成了。

回答by Sky

Answer 2020

回答 2020

If your iOS is after 13, now go to Settings -> iTunes & App Storesat the bottom you will see a section called:

如果您的 iOS 版本在 13 之后,现在转到 底部的设置 -> iTunes 和 App Stores,您将看到一个名为的部分:

SANDBOX ACCOUNT

沙盒账户

this is the place where you can log in your tester accounts

这是您可以登录测试员帐户的地方

below screenshot shows where it is:

下面的屏幕截图显示了它的位置:

enter image description here

在此处输入图片说明

回答by Shuangquan Wei

A simple solution could be to just reset your iPhone, then the sandbox iap account will be enabled to be added. Maybe it's Apple's bug.

一个简单的解决方案可能是重置您的 iPhone,然后将启用沙盒 iap 帐户。可能是苹果的bug。

回答by Wappenull

Another reason happened to me is that I (was unaware and) tried to use sandbox tester on app that downloaded from app store, which is signed with store release credential.

发生在我身上的另一个原因是我(不知道并且)试图在从应用商店下载的应用程序上使用沙箱测试器,该应用程序使用商店发布凭证进行签名。

Looks like sandbox tester will only work with app signed with development profile or test flight.

看起来沙盒测试器只能与使用开发配置文件或试飞签名的应用程序一起使用。

Correct me if someone can use sandbox tester on store-downloaded app.

如果有人可以在商店下载的应用程序上使用沙箱测试器,请纠正我。

回答by Luke Pearce

I had this problem as well, the simple solution was to sign out of my iTunes account on my physical device, restart it, clean the project and then build and run as normally. Only sign into your test iTunes account after the restart once the project is running. This issue may be caused by the way in which Apple handles or cashes users iTunes accounts on a device.

我也有这个问题,简单的解决方案是在我的物理设备上注销我的 iTunes 帐户,重新启动它,清理项目,然后正常构建和运行。只有在项目运行后重新启动后才能登录您的测试 iTunes 帐户。 此问题可能是由 Apple 在设备上处理或兑现用户 iTunes 帐户的方式引起的。

回答by Abeer Iqbal

In sandbox user provide valid username and verify it then login , It will only work after email verification

在沙箱中用户提供有效的用户名并验证它然后登录,只有在电子邮件验证后才能工作

回答by WrightsCS

Must be a bug in their system. I am testing out subscriptions and I am able to add a 1-month sub / 7-day trial, and I get the same message when I try to view the account (so I can manage the subscriptions). Other times it will just show a regular subscription message (not showing the 7-day trial message).

应该是他们系统的bug。我正在测试订阅,我可以添加 1 个月的子/7 天试用,当我尝试查看帐户时收到相同的消息(因此我可以管理订阅)。其他时候它只会显示常规订阅消息(不显示 7 天试用消息)。

I am however, still able to get this sandbox account subscribed and the app responds correctly.

但是,我仍然能够订阅此沙盒帐户并且该应用程序正确响应。

These "Sandbox" account still need to be an actual working iTunes account with a credit card attached. I figured this was the reason I was seeing the error, but after setting up and verifying this test account, I still see the error.

这些“沙盒”帐户仍然需要是一个实际可用的 iTunes 帐户,并附有信用卡。我想这就是我看到错误的原因,但在设置并验证此测试帐户后,我仍然看到错误。

I believe it to be a bug in their system as they start to implement the new subscription system. If anything, contact the Developer Tech support to see what they say, but they will never tell you its a "bug" in their system.

我相信这是他们系统中的一个错误,因为他们开始实施新的订阅系统。如果有的话,请联系开发人员技术支持,看看他们怎么说,但他们永远不会告诉您这是他们系统中的“错误”。