I am doing a sprite kit Game. I have a problem with Game Center: how i authenticate player? in AppDelegate.swift i have this code:
func authenticateLocalPlayer()
{
var localPlayer = getLocalPlayer() // see GKLocalPlayerHack.h
localPlayer.authenticateHandler =
{(viewController : NSViewController?, error : NSError?) -> Void in
if viewController != nil
{
self.presentViewController(viewController!, animated:true, completion: nil)
}
but i get this error:
Value of type 'AppDelegate' has no member 'presentViewController'
on this line:
self.presentViewController(viewController!, animated:true, completion: nil)
How can i solve this problem?