swift – iOS SwiftUI – Google Signal-In error: Additional argument ‘callback’ in name


I obtained this code:

func signIn(){

   guard let presentingViewController = (UIApplication.shared.connectedScenes.first as? UIWindowScene)?.home windows.first?.rootViewController else {return}

    let signInConfig = GIDConfiguration.init(clientID: "xxxxx")
    GIDSignIn.sharedInstance.signIn(
        with: signInConfig,
        presenting: presentingViewController,
        callback: { consumer, error in
            if let error = error {
                self.errorMessage = "error: (error.localizedDescription)"
            }
            self.checkStatus()
        }
    )
}

I get the error “Additional argument ‘callback’ in name”

on the brace in

callback: { consumer, error in

please assist