generateIdentityVerificationSignature(completionHandler:)
Generates a signature so that a third-party server can authenticate the local player.
Declaration
func generateIdentityVerificationSignature(completionHandler: (@Sendable (URL?, Data?, Data?, UInt64, (any Error)?) -> Void)? = nil)func generateIdentityVerificationSignature() async throws -> (URL, Data, Data, UInt64)Parameters
- completionHandler:
A block to call when the request completes.
The block receives the following parameters:
- publicKeyUrl
The URL for the public encryption key.
- signature
The verification signature data that GameKit generates.
- salt
A random
NSStringthat GameKit uses to compute the hash and randomize it.- timestamp
The signature’s creation date and time.
- error
If an error occurrs, this parameter holds an error object that explains the error. Otherwise, the value of this parameter is
nil.
Discussion
To generate a signature on your server, see the fetchItems(forIdentityVerificationSignature:) method.