I’m using GameCenter (Social.localUser.Authenticate) for my iOS version. And Game Center is not present in XCode under Signing Capabilities. Is this by design?
I though Unity was adding it automatically upon detecting Game Center usage? I have “Automatically add capabilities” checked in Player Settings
I’m Unity 2021.3.21f1 with XCode 14.2
I can manually add the capabilities, which is adding com.apple.developer.game-center to the entitlements file.
Can confirm that ProjectCapabilityManager.AddGameCenter doesn’t appear to do anything. When creating a build and then checking XCode, the Game Center capability is still missing.
Strange, because it seems like ProjectCapabilityManager.AddPushNotifications and ProjectCapabilityManager.AddAppleSignIn both work…
Hey, thank you for the report.
We’ve confirmed this and I am working on making ProjectCapabilityManager.AddGameCenter also add the required entitlement, not only capability
It’s a bit unusual that Game Center capabilities aren’t automatically added in Unity when you’re using Social.localUser.Authenticate. Unity generally does a good job of handling these things seamlessly.
Since you’ve got “Automatically add capabilities” checked in Player Settings, it should have added the necessary capabilities to your Xcode project. But if it hasn’t, manually adding the com.apple.developer.game-center capability is a good workaround.
But if you ever need to make quick decisions, you can use an online heads or tails coin. It’s a handy digital coin toss when you can’t find a physical one.