我试图让一些排行榜进入我的游戏并且我收到了以下错误:
No visible @interface for 'MGLGameCenterManager' declares the selector 'callDelegateOnMainThread:withArg:error:'
它就在这里,
- (void) authenticateLocalUser
{
if([GKLocalPlayer localPlayer].authenticated)
{
return;
}
[[GKLocalPlayer localPlayer] authenticateWithCompletionHandler:^(NSError *error)
{
[self callDelegateOnMainThread: @selector(processGameCenterAuthentication:) withArg:
NULL error: error];
}];
}
问题是什么?
答案 0 :(得分:0)
这是我setAuthenticateHandler:
[GKLocalPlayer localPlayer].authenticateHandler = ^(UIViewController *viewController, NSError *error)
{
if (error)
NSLog(@"Authentication failed %@", error.localizedDescription);
else
{
if (viewController)
[[CCDirector sharedDirector] presentViewController:viewController
animated:YES
completion:nil];
else
[self proccessAuthentification];
}
};