I'm making an iPhone SpriteKit-based game, and I just added all the code for game center, but when I try to run it I get a pop-up window that says, "Game Center unavailable, player is not signed in". So I was looking through the game center programming guide and it says that I am supposed to enable the sandbox option, but when I go into Settings then Game Center, there is no option to enable the sandbox. I only get an option for logging. I was wondering how I can enable sandbox in Game Center so I can hopefully solve this issue.
Have you viewed this link?
You may need to sign out of your GameCenter account before you can do this.
When I signed into Gamecenter, signed out, signed back in then switched to myapp I see "Welcome back sandbox". It looks like Sandbox is automatic in the simulator.
Related
I'm trying to finish up a small game I'm writing in Xcode for iOS.
I have a valid developer account and team setup and I've followed the simple procedure outlined here;
https://developer.apple.com/library/content/qa/qa1814/_index.html
But when I try to add Game Center capability in Xcode I get and error that states that I should "Add the Game Center feature to your App ID".
Game Center Capability Warning Message
But then there is no matching App ID in my developer Web site and I can't add it either as it complains that "An App ID (with my App ID) is not available".
Frustrating as hell, tips appreciated.
Have you added your Apple Developer account to Xcode via the Xcode Preferences screen's Accounts tab?
If you have not added your account there, add it and then try switching the Game Center capability on and off for your project.
If you have added the account already, then try exiting Xcode and restarting it. Sometimes Xcode appears to get a bit "confused" after it has been running for a while and a simple restart seems to fix a lot of issues :)
If neither of the above helps, let me know and I'll try to help you figure out what is going on.
I have a game that uses match-making in Game Center and everything worked great during testing in Sandbox. It went in the app store yesterday and now during match-making I get "Unable to create match. Please try again later.". I went back to my build in xcode and noticed that Game Center was turned OFF in the capabilities section. Is this the problem? If so why did it work in Sandbox?
I just want to make sure this is the problem before I resend since it is taking about a week per review and I want to get it right.
Yes, you need to have this turned on in your capabilities.
I am trying to implement Game Center in my game. I've tried it on the iOS 8 GM.
I'm not able to get the authentication to work on device, but it works fine in the simulator. I'm using the code provided in Apple's documentation.
Do other people have the same issue? Any advice?
Happened to me as well in iOS8. Just need to enable Sandbox in Settings--> Game Center --> Sandbox.
In order to make it works you must be sure that:
The SandBox Mode it's Enable on your device
Your bundle id on Xcode must be the same bundle id on Itunes Connect
You have to enable the Game center on itunes connect:
Go to itunesconnect website (https://itunesconnect.apple.com)
Open Your app. (in My apps section)
Find "Game Center" tab. Click it.
Then click on switch "Enable/Disabled"
I´m trying to develop a multiplayer App & I´m using GKMatchmaker for that.
Unfortunately its .inviteHandler is never fired, it just says "failed" in the game center invite dialogue. The app works with AUTO-MATCH though.
I did some testing & made sure that
2 seperate sandbox gamecenter accounts are logged in.
the test app runs on 2 devices (1 iPhone 4S & 1 iPad 2)
They still don´t connect.
I tried to start DOODLE JUMP (an existing iOS Game) und use the sandbox accounts for multiplay... they did not work either. Then i logged in with my REAL NON SANDBOX accounts to game center & THERE Doodlejump was working and the invitation was received successfully.
Do you have any ideas, how I could make my sandbox account work & receive my game center invitations?
Hope this still would be useful for someone...
Check two things in such situation:
You set inviteHandler just after the local player has authenticated.
The player you're trying to invite did allow game invites in their account settings. In case you had two test accounts, you could forget you disallowed it for both of them. In such case the push notification for invite won't even be sent to the other player.
As stated in the Apple GameKit Programming Guide, a signed distribution build app will use the live GC environment, while everything else will use the sandbox. Unless you have the Doodle Jump source and build a debug version to run on your devices it will not work in sandbox mode properly.
Also you should make sure you are calling your inviteHandler method as soon after you authenticated a user as possible.
If the above don't work, try restarting your devices. I created two test accounts and logged into two different devices with each respective account. I couldn't get invitations to work, though automatching was working fine. Restarting the devices somehow 'registered' them to get push notifications from Game Center, and invitations suddenly started 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 Game 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