Hi all,
I'm working on my first game, and the first step of getting the authenticator view is not working. To simplify the problem, I made a brand new app which only has the following code in the main view controller:
import GameKit
class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
GKLocalPlayer.local.authenticateHandler = { viewController, error in
NSLog("GameKit authenticating")
if let vc = viewController {
NSLog("IT WORKED! \(vc.description)")
} else {
NSLog(error!.localizedDescription)
}
}
}
}
I've looked through older, similar issues, and so I made sure that I'd done the following:
- Game center is enabled in the app's Capabilities in Xcode.
- I've created an app associated with the bundle ID in App Store Connect.
- In the app's Services tab, I've created two leader boards, one "classic single".
- Also in Services, I've created one achievement.
- In the app's "prepare for submission" panel, I've turned on gamecenter, linked the leaderboards, and linked the achievement.
- For this test app, I have not yet uploaded a build, but I did do so on the actual game app, and and that didn't fix it.
And with all that done, in my logs, it looks like this:
2022-01-16 16:28:01.582366-0800 test1ofgamecenter[6863:1006170] [Account Error] startAuthenticationForExistingPrimaryPlayer:Failed to Authenticate player.Error: Error Domain=GKErrorDomain Code=15 "The requested operation could not be completed because this application is not recognized by Game Center." UserInfo={NSLocalizedDescription=The requested operation could not be completed because this application is not recognized by Game Center.}
2022-01-16 16:28:01.976807-0800 test1ofgamecenter[6863:1006170] GameKit authenticating
2022-01-16 16:28:01.976988-0800 test1ofgamecenter[6863:1006170] The requested operation could not be completed because this application is not recognized by Game Center.```
I notice that my achievements and leaderboard are not "live" and I presume that is because I have not submitted the app for review, but I want to get it working before I submit a build that I would expect and want to be rejected.
Is there anything else I need to do? Does this configuration require human intervention by Apple staff members? I started this phase of the development Friday evening, so I guess it'd make sense if waiting until Monday would fix it, but that seems weird.
Any help?
Vital Stats:
- M1 Macbook Air
- Xcode 13.2.1 (13C100)
- Macos Monterey 12.1
- Testing on an iPhone XR and a 2021 iPad Mini, both with the most recent updates of their respective OS's
Not sure what happened with the formatting, but clearly the Xcode logs end just before "I notice..." Sorry about that!
I hope it's clear in the question, but I've looked at a number of other similar questions in the forums, and while some respondents indicate that adding a leader board or an achievement or both fix the problem, that hasn't seemed to be the case for me. I'm happy to try anything else... Like is there a GameCenter equivalent of the old App Store sandbox that I'm supposed to test against? I thought the sandbox went away a few years ago, but I'm grasping at straws here.
Quick update for the folks following this issue:
Apple support asked me for more details yesterday, and I provided those details last night.This morning, I got a notification that it's been escalated to a senior advisor on the developer support team.I let them know that, based on the up-votes and comments this has gotten, a resolution would make a lot of people happy.Of course, they can't promise an exact time frame, but I have to say, I'm impressed so far with their engagement. I'm feeling hopeful!Finally, whatever useful information I get from my case, I'll post here ASAP so you can benefit from it, too!`