GameCenter authentication in landscape-only app throws UIApplicationInvalidInterfaceOrientation

While writing this question and experimenting with code, it seems that I’ve found a solution: enable all orientations in project summary and remove application:supportedInterfaceOrientationsForWindow. Add this code to ViewController: – (NSUInteger)supportedInterfaceOrientations { return UIInterfaceOrientationMaskLandscape; } Now it works seamlessly.

How to authenticate the GKLocalPlayer on my ‘third party server’?

Here is a C# WebApi server side version: public class GameCenterController : ApiController { // POST api/gamecenter public HttpResponseMessage Post(GameCenterAuth data) { string token; if (ValidateSignature(data, out token)) { return Request.CreateResponse(HttpStatusCode.OK, token); } return Request.CreateErrorResponse(HttpStatusCode.Forbidden, string.Empty); } private bool ValidateSignature(GameCenterAuth auth, out string token) { try { var cert = GetCertificate(auth.PublicKeyUrl); if (cert.Verify()) { var … Read more