It's possible to open the Game Center app from your own app using:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:"]];
Is there a way to open it on the page for a specific game?
A URL scheme allows you to launch a native iOS application from another iOS app or a web application. You can set options in the URL that will be passed to the launched application.
The app: URL scheme can be used by packaged applications to obtain resources that are inside a container. These resources can then be used with web platform features that accept URLs.
Custom URL schemes provide a way to reference resources inside your app. Users tapping a custom URL in an email, for example, launch your app in a specified context. Other apps can also trigger your app to launch with specific context data; for example, a photo library app might display a specified image.
I've tried many different combinations. Judging by iBook's lack of such a feature, the lack of documentation and as I'm sure you've found—the lack of info on the internet—I'm going to say that someone'd probably have to either brute force the URL to figure it out (if it's set up to go to individual apps by URL at all). Here are some I've tried:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:id350536422"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:us/app/cheese-moon/id350536422"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:games/"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:350536422"]];
UPDATE
I combed through the internals of the OS and found out the URL resolution patterns for Game Center:
You'll need to be savvy with regex to use all of them. Here are some I've typed out for you:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:/me/account"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:/me/signout"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:/friends/recommendations"]];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"gamecenter:/games/recommendations"]];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With