Why can not I display the value in print?

0

I want to display in the console the value of the variable name what appears is "(lldb)", why this?

@IBAction func botaoAcesse(_ sender: Any) {

    let cpf = self.campoCPF.text
    let senha = self.campoSenha.text

    let param = ["cpf": cpf, "senha": senha, "method": "app-get-login", "plataforma":"ios"]
    var _: HTTPHeaders = ["Content-Type": "application/json"]
    let url = "http://easypasse.com.br/gestao/wsLogin.php"

    Alamofire.request(url, method:.post, parameters:param,encoding: JSONEncoding.default).responseJSON { response in
        switch response.result {
        case .success:
            print(response)
            if let JSON = response.result.value as? [String: Any] {
                let registro =  JSON["registro"] as? String
                let usuario = JSON["usuario"] as? String
                let nome = JSON["nome"] as? String
                print(nome!)

            }

        case .failure(let error):
            print(0,"Error")
        }
    }
}

    
asked by anonymous 09.07.2018 / 04:26

1 answer

0

Dear friend,

First start adjusting your Json return, as it does not seem to be correct and so it may not be entering your if let.

To help you, I suggest validating your json on the site: link

    
10.07.2018 / 19:09