Olá. Eu estava tentando simular o cadastro de alunos no app, porém toda vez que eu tentava usando o meu iPhone, me era apresentada essa mensagem no meu console de erro:
2019-03-07 21:04:19.159560-0300 Agenda[14709:3738540] [] nw_socket_handle_socket_event [C1.1:2] Socket SO_ERROR [61: Connection refused]
2019-03-07 21:04:19.162962-0300 Agenda[14709:3738540] [] nw_socket_handle_socket_event [C1.2:2] Socket SO_ERROR [61: Connection refused]
2019-03-07 21:04:19.163339-0300 Agenda[14709:3738540] TIC TCP Conn Failed [1:0x2808295c0]: 1:61 Err(61)
2019-03-07 21:04:19.165492-0300 Agenda[14709:3738540] Task <64106E25-F765-4A35-90A1-36F24B28DD38>.<1> HTTP load failed (error code: -1004 [1:61])
2019-03-07 21:04:19.165690-0300 Agenda[14709:3738541] Task <64106E25-F765-4A35-90A1-36F24B28DD38>.<1> finished with error - code: -1004
2019-03-07 21:04:19.172515-0300 Agenda[14709:3738540] Task <64106E25-F765-4A35-90A1-36F24B28DD38>.<1> load failed with error Error Domain=NSURLErrorDomain Code=-1004 "Could not connect to the server." UserInfo={_kCFStreamErrorCodeKey=61, NSUnderlyingError=0x283347000 {Error Domain=kCFErrorDomainCFNetwork Code=-1004 "(null)" UserInfo={_kCFStreamErrorCodeKey=61, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=LocalDataTask <64106E25-F765-4A35-90A1-36F24B28DD38>.<1>, _NSURLErrorRelatedURLSessionTaskErrorKey=(
"LocalDataTask <64106E25-F765-4A35-90A1-36F24B28DD38>.<1>"
), NSLocalizedDescription=Could not connect to the server., NSErrorFailingURLStringKey=http://localhost:8080/api/aluno/lista, NSErrorFailingURLKey=http://localhost:8080/api/aluno/lista, _kCFStreamErrorDomainKey=1} [-1004]
Não sei se eu fiz alguma coisa errada ou se faltou alguma configuração, pelo simulador ele funciona, mas no dispositivo real não.