         MCAAuthorizationManager.sharedInstance.registerAuthenticationDelegate(self, realm: GoogleAuthenticationManager.GOOGLE_REALM)
     }
     
-    public func onAuthenticationChallengeReceived(_ authContext : AuthenticationContext, challenge : AnyObject) {
+    public func onAuthenticationChallengeReceived(authContext : AuthenticationContext, challenge : AnyObject) {
         self.authContext = authContext
         
         guard let appID = challenge[GoogleAuthenticationManager.GOOGLE_APP_ID_KEY] as? String where appID == GIDSignIn.sharedInstance().clientID

    // pressed the Sign In button
    
    @objc
    public func sign(inWillDispatch signIn: GIDSignIn!, error: NSError!) {
        // no needed work for now
    }
    
    // Present a view that prompts the user to sign in with Google
    @objc
    public func sign(_ signIn: GIDSignIn!, present viewController: UIViewController!) {
        if var topController = UIApplication.shared.keyWindow?.rootViewController where self.localVC == nil {
            while let presentedViewController = topController.presentedViewController {
                topController = presentedViewController
            }

            self.localVC = topController
        }
        
        localVC!.presentViewController(viewController, animated: true, completion: nil)
    }
    
    // Dismiss the "Sign in with Google" view
    @objc
    public func signIn(signIn: GIDSignIn!, dismissViewController viewController: UIViewController!) {
        localVC!.dismissViewControllerAnimated(true, completion: nil)
        localVC = nil
    }
}
