Game Center Not Recognizing my game - iphone

I am making a test app to learn using Game Center. I've read many tutorials and questions here in stack overflow and i'm on the right way.
Now, i have met a behaviour i don't understand and i thought someone might shed some more light upon it and solve my problem.
I have created a user from the Game Center on the simulator and i am able to enter into it.
If i'm logged into it, and then run my app i get the wonderful "Welcome back" sign from game center.
But when i log out of there it acts differently. I start my app and get the login form. When trying to log in i get a UIAlert that says the "This game is not recognized by game center".
How come? A minute ago everything went smooth…
Anyway, i tried checking the bundle identifier on iTunes connect and on my app, i checked that game center is supported on the iTunes connect. I even created a group (although i'm not sure what it means yet).
Nothing works. (except logging to game center before starting the app)
Any thoughts?
Let me know if you need any code

OK… This is solved now. The main issue was the bundle ID.
One place showed: com.myCompanyName.gameName
and the other: myCompanyName.gameName
The .com is what i missed.
Thank to all those who tried to help.

Very first thing you have to enable Game Center for your App_ID from apple.developer.com
.Next thing you need to make use of same App_ID as Bundle ID while creating App on iTunes Connect. And I hope you have added details of Game Center in that app on iTunes Connect. Also be sure you are using provisioning profile with same Bundle ID.

Related

Sandbox: Prompt to remove Game Center data when app is deleted?

I've looked for an answer in the Apple Docs, and here and other sites, and cannot find anything. So I'm hoping to find someone who knows or has experience with it.
My app is using GameKit to store some Achievements (no scores or leaderboard). When I delete the app from the simulator, it is NOT prompting me if I want to delete the GameCenter data as well, like production apps usually do. Is this normal? Do I need to do anything specific to create this prompt? Or will it simply appear in the production version and is not available for some reason in the Sandbox?

iphone -- switching between game center sandbox and production environments

I am having a terrible time with this. Either my device is in sandbox mode and I want it to be in production mode, or vice versa. I typically go into the settings app and sign myself out of the app store. I seem to remember reading in a doc somewhere that this would allow me to switch. But I still generally can't switch to whichever environment I need to be in.
Any tips?
It's possible to sign yourself out from the account button of the GameCenter app.
This is tricky. You have to sign-out in the Game Center App, but the button is hard to find since it's just a yellow rectangle that has your Game Center name on it. You then HAVE TO sign into your sandbox account from within your App. You can not sign into the Sandbox account via the Game Center App (despite it appearing that you have).
In iOS 7.1 it took me awhile to figure it out but the way to sign out is: go to Settings -> Game Center -> click your Apple ID email. Three options show up in a popup. Hit sign out. Such a bad UI design.

Is there a project setting that controls getting to Game Center's Sandbox?

This is different from the others; it's cool.
I know that your Bundle Identifier needs to match your iTunes Connect's version. I know you need to make a new AppleID through your dev app and not through Game Center. Most people get this fixed when they force quit their app and game center and launch theirs first.
I am not one of those people.
If I take the GKTapper tutorial and use my game's Bundle Identifier as the only change, things are good. On launch, it asks me if I want to use an existing or make a new account. But more importantly, it says * Sandbox *. (Before I log in, mind you; this is not an account problem at all.) Once inside I can see my achievements.
If I load my game, I has a sad. On launch I get the same dialog, but it does not say Sandbox. My game is two weeks away from being done after many long months. Moving everything in to a new project is possible, but a pain. So the question is:
What magic setting does GKTapper or a new project have that my game that I started in June does not that lets you get to Game Center's Sandbox?
YOU HAVE GOT TO BE KIDDING ME.
The "Sandbox" tag doesn't show up in landscape. It worked the whole time. I would delete this question but people need to be able to search for this. I just enabled portrait and flipped back and forth and watched Sandbox appear and disappear through my tears.

How to implement Game Center in iOS app?

I am a bit confused now. I read through a lot articles that describe how to implement game center. All of them mention that I have to create an app at itunes connect first.
So do I have to submit my app to iTunes first? Why do I have to do that? Do I have to set a later release date than?
All suggestions appreciated!
You just have to create an App Id on the Itunes Connect. When you create an App Id you just give some meta-data (the most important is the Bundle Identifier) about your application but you don't have to submit any binaries. You submit the binary application when you want submit it on the App Store.
You must create an App Id because It'll allow you to use the game center server to do your tests.
There is a very good tutorial on Ray Wenderlich blog: How To Make A Simple Multiplayer Game with Game Center Tutorial
You don't need to submit your app but you do need to create an application on iTunes Connect. Basically, you register all the meta-data about your app (eg. the name) but don't actually upload a binary yet. In the app management area you setup Game Center leaderboards and achievements.
Before doing that though you need to create a unique ID for your app. You create the ID in the Provisioning area and it's referred to as the App ID there, but when you actually choose the ID in iTunes Connect it's referred to as the bundle ID.
Note that the way iOS actually connects Game Center to your app is using the bundle ID in the provisioning profile, so make sure to create a new development profile without wildcard characters to use when building your app.
And finally it's important to connect to the testing sandbox and not the "real" Game Center during development. Basically, if you aren't logged in to Game Center while playing your game then a pop-up will ask if you want to log into the testing sandbox.

"This game is not recognized by game center." iPhone Development

There are already a couple of questions on this but I followed their steps to solve it and it doesn't seem to work for me. Here's what I have done:
1. I double checked to have the bundle identifier in the xcode project to be the exact same as the provisioning profile found on the provisioning portal (it also says Game Center is enabled). No wildcards.
2. I have logged in using a sandboxed account to gamecenter (made 2 accounts incase one wasn't sandbox). I did see the word "sandbox" with some numbers/letters on the top left while signing up for an account, so I'm 100% sure I have a sandboxed account. Tried 2 different sandbox accounts. Tried on 2 different devices (ipad/iphone). Also tried on the iPhone simulator.
3. I have deleted my app from my iPhone many times and tried it again.
I'm running 4.3/xcode 4 on iPhone + iPad.
I'm still receiving the message. Any help would be appreciated. Thanks!
From memory (I battled with this recently)…
In addition to what you've already done, you have to setup your app (even if it's using a fake bundle ID) in ITC (iTunes Connect). This means you need to put in a name, category, a screenshot and a bunch of other stuff (you can just put dummy data in there for testing purposes). Then you need to create a version of your app, then enable Game Center on that version.
There might have been a few other important steps that I've forgotten, but in between the voodoo dancing and making sacrifices to the gods of iOS etc., that's all I can recall.
Deleting the old app from your device can sometimes help too. Looks like it stores some data with an app and will try to login to actual Game Center instead of Sandbox Mode.
This solved my problem when trying to add Game Center in an update.
This is how I solved the problem. I opened the Settings App, then select Game Center. At the bottom under Developer, turn on "Sandbox".
I had a similar problem. Make sure you have the exact same app version in xcode and ITC. For example, if you have 1.0 in xcode and 1 in ITC it will not work. The version is a string not a float, so 1.0 != 1.
My situation is , It showed "this game is not recognized by game center",and my ipad is jail-broken. so I uninstall Appsync 5.0+ in Cydia--> logout game center---> reinstall app, it's ok now
In my case, almost everything people had suggested was in already correct for my app.
My bundle IDs were correct, my iTunes Connect record was set up, etc. However, the version number of the build that had been uploaded to iTunes Connect was not recent (and didn't match the version I was building onto the test device).
After uploading a newer build to iTunes Connect with a matching version number, it appeared to fix the problem.
I'm not guaranteeing it won't break in the future (because the authentication seems to be very flaky and has worked previously, even with the old version record), but for now it seems to have solved the problem for me.
I learned from somewhere that if your machine(iphone or ipad) is jail-broken, it will assume you use the real game center without the sandbox one.
So, if your devices are jail-broken, just restore it, and give it a try.
Hope this will help you.