Sunday, 24 June 2018

Gamecenter setting authenticate handler crashes

func authenticateLocalPlayer(player: GKLocalPlayer) {
        player.authenticateHandler =
            ({ (viewController : UIViewController!, error : NSError!) -> Void in
                if viewController != nil {
                    self.present(viewController, animated:true, completion: nil)
                } else {

                }
                } as! (UIViewController?, Error?) -> Void)

    }

this freezes on that last line -- as! (UIViewController?, Error?) -> Void)

with nothing in the stack trace beyond that.. just freezes execution. What's happening here?

How do I set the authenticate handler?

mouseover of the freeze: Thread 1: EXC_BREAKPOINT (code=EXC_ARM_BREAKPOINT, subcode=0xe7ffdefe)



from Gamecenter setting authenticate handler crashes

No comments:

Post a Comment