Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"6.0"))
- {
- GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
- localPlayer.authenticateHandler = ^(UIViewController *viewController, NSError *error)
- {
- if (viewController != nil)
- {
- AppController *appDelegate = (AppController*)[UIApplication sharedApplication].delegate;
- [delegate.viewController presentViewController:viewController animated:YES completion:nil];
- }
- else if (localPlayer.isAuthenticated)
- {
- NSLog(@"Player authenticated");
- }
- else
- {
- NSLog(@"Player authentication failed");
- }
- };
- }
- - (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
- {
- return UIInterfaceOrientationMaskAllButUpsideDown;
- }
Add Comment
Please, Sign In to add comment