I am consuming a web service from a native app for ios, above the address of the web service was http , and I had to connect to a vpn to consume , to go public we changed the web service server and we have added a protocol security (https ), but now I try to query the web service and the native app returns me null and testing it in the browser if the web Service is consumed and I returned values.
this is the code that i use to consume the web service from objective- c:
_urlConDatos = [NSString stringWithFormat:@"https://mhwfmobt.aeroman.com.sv:7003/AEPublicWS/webresources/login/%@/%@", _usuarioProp.text, _passProp.text];
jsonURL = [NSURL URLWithString: _urlConDatos];
NSLog(@"%@", jsonURL);
NSError *error;
jsonData = [[NSString alloc] initWithContentsOfURL:jsonURL encoding:NSUTF8StringEncoding error: &error];
NSLog(@"%@", jsonData);
if(jsonData != nil){
NSLog(@"%@", jsonData);
NSData *array = [jsonData dataUsingEncoding: NSUTF8StringEncoding];
NSError *e;
jsonArray = [NSJSONSerialization JSONObjectWithData: array options: 0 error:&e];
_nombreProp = jsonArray[1];
_cod86 = jsonArray[0];
_ISSS = jsonArray[3];
//_permisos = jsonArray[4];
NSLog(@"%@", _permisos);
NSLog(@"%@", jsonArray);
the variable " jsonData " returns me null.