From what I have seen, by adding:
.onAppear {
GKAccessPoint.shared.location = .topLeading
authenticateUser()
GKAccessPoint.shared.isActive = true
}
and
func authenticateUser() {
localPlayer.authenticateHandler = { vc, error in
guard error == nil else {
print(error?.localizedDescription ?? "")
return
}
}
}
on my main screen, game center should show the login button, the notifications and keep a logged in icon you can click to access the game center screen. And it has worked.. for a while.
However, suddenly it stopped, the login, notifications and buttons still work, but when I click the logged in game center icon, the game kit screen only appears for a millisecond and is automatically dismissed.
I am receiving these errors when I click the icon:
Cannot add page fields because none are specified by the metrics fields context. Did you forget to add an PageMetricsPresenter to the object graph used for actions?
Error acquiring assertion: <Error Domain=RBSAssertionErrorDomainCode=2 "Specified target process does not exist" UserInfo={NSLocalizedFailureReason=Specified target process does not exist}>
[com.apple.GameCenterUI.GameCenterDashboardExtension(1.0)] Connection to plugin interrupted while in use.
Does anyone know how to fix it?