Skip to content

Commit

Permalink
game center fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ianmaclarty committed Dec 26, 2016
1 parent e9d650d commit 6c564b8
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/am_backend_ios.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1051,19 +1051,14 @@ static int init_gamecenter(lua_State *L) {
}];
*/

/*
* XXX FIXME for iOS 6
if ([GKLocalPlayer localPlayer].authenticated == NO) {
GKLocalPlayer *localPlayer = [GKLocalPlayer localPlayer];
[localPlayer setAuthenticateHandler:(^(UIViewController* viewcontroller, NSError *error) {
[localPlayer setAuthenticateHandler:(^(UIViewController* viewController, NSError *error) {
if(localPlayer.isAuthenticated) {
am_debug("%s", "gamecenter authenticated ok");
gamecenter_available = true;
} else if(viewController) {
[self presentViewController:viewController]; //present the login form
} else {
//problem with authentication,probably bc the user doesn't use Game Center
am_debug("%s", "gamecenter authentication failed");
//problem with authentication, probably because the user doesn't use Game Center
//am_debug("%s", "gamecenter authentication failed");
}
})];
} else {
Expand All @@ -1072,7 +1067,6 @@ static int init_gamecenter(lua_State *L) {
gamecenter_delegate = [[GameCenterDelegate alloc] init];
[gamecenter_delegate retain];

*/
return 0;
}

Expand Down

0 comments on commit 6c564b8

Please sign in to comment.