开发者

IOS Game Center on iPad simulator not working

I believe this question has been asked before but the solution(s) offered were not relevant or applicable to me.

I am halfway through coding a game app and have just added basic Game Center functionality to my app - it just checks if the user is signed into the Game Center upon startup. If not, it should show a pop-up box prompting the user to either sign in or cancel. When I ran the app in my iPad simulator, I realised it was not doing anything. When I tried running the Game Center app itself in my iPad simulator, I realised that I could not sign in with my usual iTunesconnect account - it just kept hanging. When I tried to "Create new account", it said "Game Center account services are currently unavailable". However I am able to use the Safari app in the simulator to access the web.

I have an iPad at home which is connected to the internet via the same router (so it cannot be a firewall config problem) which is always on Gam开发者_运维问答e Center. When I got the error message on my simulator, I checked the connection on my iPad and I was still logged into the Game Center. When I tried signing out, I could sign in again immediately without any problems. So I tried testing my app in my iPad instead - I got xCode to build the app in my iPad. When I ran the app, it popped up the pop-up box, saying it was using a Sandbox account, and prompted me to sign in with my itunesConnnect account so I did so, but nothing else happened - however I had not programmed any further Game Center functionality into the app. When I quit my app and tried running the Game Center app from my iPad, it started behaving like the iPad simulator -- it would hang when I tried to sign in with my iTunesconnect account, and when I tried to create a new account instead, it would tell me that the services were currently unavailable... when barely 10 mins before, before I installed and ran my app, everything was working OK.

Could I have hosed some settings in my iPad Game Center and now it won't work?? I do not understand how installing my app could have affected the Game Center app in any way. Now both my iPad device and my simulator will not sign into Game Center.

PS: I have checked my /etc/hosts file etc. on my computer and it is the default file, it cannot be a problem with my firewall because I was always able to access Game Center on my iPad before this. Does anyone have any ideas? This is driving me crazy and I wonder if I have to resort to clicking "Restore" on my Ipad to bring the Game Center back. But it still won't solve the problem with the simulator on my Mac not working.

Thank you for any suggestions!!!! Artie


I've struggled with exactly the same symptoms over the past few days. In the end, I had to disable my firewall (running on a 3com ADSL OfficeConnect), then the sandbox mode works. Interesting notes:

  • Like you, I was just attempting to set up GC authentication to a sandbox account at this point.
  • I can access the non-sandbox GameCenter servers with the firewall running on high. Access to normal GameCenter doesn't imply it isn't a firewall problem.
  • This is a common hardware router/firewall, and I wasn't blocking any particular ports.
  • This is repeatable -- toggling the firewall on and off prevents/allows access to the GC sandbox servers.

[Speculative: the firewall's logging is pretty useless, but it reports a (non-existent) TCP FIN scan -- the "high" settings may be a bit sensitive. Doesn't make much sense that this would only affect access to the sandbox servers, but empirically, it does.]


In order to use Game Center on a test app you have to set up development Game Center (sandbox) accounts specific to your app and use those to log in and test game center features.

You can read the Game Kit Programming Guide: Game Center Overview to make sure you have everything setup correctly on the Apple server side before adding game center code to your app.


Close your app and any other Game Center apps. go to Settings->Game Center - click on your connection name and select Sign out. Next run a game Center app that you did not write (EX angry birds) logon into to game center (tara) you are no longer in sandbox

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜