Table of Contents

GameCenterCredentials

Constructors
public GameCenterCredentials(string teamPlayerId, string bundleId, string publicKeyUrl, byte[] signature, byte[] salt, ulong timestamp)

Creates the Game Center credentials that GameKit's fetchItems(forIdentityVerificationSignature:) returned.

Parameters
Type Name Description
string teamPlayerId

GKLocalPlayer.teamPlayerID — not gamePlayerID.

string bundleId

Bundle identifier of the application the signature was generated for.

string publicKeyUrl

Apple certificate URL returned by GameKit.

byte[] signature

Signature returned by GameKit.

byte[] salt

Salt returned by GameKit.

ulong timestamp

Signature creation time returned by GameKit, in milliseconds since the Unix epoch.

Remarks

Your title obtains these values itself — coherence never calls GameKit, and therefore cannot validate them. Two mistakes are only catchable on the calling side:

Pass GKLocalPlayer.teamPlayerID, not gamePlayerID. Apple's signature only attests the teamPlayerID, and it is the identifier flavor the Game Center friends API returns, so anything else is rejected as invalid credentials.

Only use the credentials when GKPlayer.scopedIDsArePersistent() is true. When it is false — for guest players and some identity-less states — GameKit returns session-scoped identifiers that change every session, so every login would silently create a fresh, orphaned player account. The signature still verifies, so neither coherence nor the backend can detect this; the check on the calling side is the only guard.