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

    // 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
            }

    
    
    @objc
    public func signIn(signIn: GIDSignIn!, didSignInForUser user: GIDGoogleUser!, withError error: NSError!) {
        if (error == nil) {
            let idToken = user.authentication.idToken // Safe to send to the server
            if let unwrappedAuthContext = authContext {
