简体   繁体   English

多个设备上的Game Center沙箱

[英]Game Center sandbox on multiple devices

I am building an app that uses Game Center. 我正在构建一个使用Game Center的应用程序。 To test I was using my iPhone and the simulator to log in with different accounts. 为了测试,我使用我的iPhone和模拟器以不同的帐户登录。 I now want to use my wife's phone to test with me and when I open the app it's not logging into the sandbox. 现在,我想使用妻子的电话与我进行测试,当我打开该应用程序时,它没有登录到沙箱。

It shows the game enter modal logged in but play now and invite buttons are greyed out and it says unauthenticated user. 它显示游戏已进入登录模式,但现在可以玩,邀请按钮显示为灰色,并显示未认证用户。

How do I make my wife's iphone use Game Center sandbox. 如何使我妻子的iPhone使用Game Center沙箱。

Thanks 谢谢

As a developer, you are required to create a separate Game Center account for Sandbox. 作为开发人员,您需要为沙盒创建一个单独的Game Center帐户。 At any given time, you must choose whether to log into Sandbox for testing, or into the live environment. 在任何给定时间,您必须选择是登录到沙盒进行测试还是登录实时环境。 Start by launching the Game Center app and logging out the currently authenticated player . 首先启动Game Center应用程序,然后注销当前已通过身份验证的玩家 After this, run your game or another Game Center-enabled game . 之后, 运行您的游戏或其他启用Game Center的游戏 Depending on how that app is distributed, you enter different credentials. 根据该应用程序的分发方式,您输入不同的凭据。 If that app is provisioned for development, enter your test account information (logging you into the Sandbox) . 如果该应用程序已准备好进行开发,请输入您的测试帐户信息(将您登录到Sandbox) Otherwise, enter your live account information (logging you into the live environment. 否则,请输入您的真实帐户信息(将您登录到真实环境中。

Just log out of Game Center and launch your app. 只需注销Game Center并启动您的应用即可。 Then you enter you log into your test account. 然后,您输入登录到测试帐户。

From Apple . 来自苹果

Launch Gamecenter -> Me -> Tap on Account: -> Sign Out. 启动Gamecenter-> Me->点击帐户:->注销。 Sign in with your sandbox account. 使用您的沙盒帐户登录。

So it ended up being that I wasn't opening the modal sandbox sign in from my app. 最终导致我没有打开我的应用中的模式沙箱登录。 I made a code change that upgraded the call to display the login to support IOS6. 我进行了代码更改,升级了呼叫以显示登录以支持IOS6。 The previous method I was using was deprecated. 我使用的先前方法已被弃用。 Therefore the new code I put in forgot to present the modal for sign in which left me hanging when I went into the app. 因此,我输入的新代码忘记了显示模态的方式,当我进入该应用程序时,该方式使我感到困惑。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM