Ive got this code to consume it works in iOS8 and iOS10 but not in iOS9
BOOL blnAnswer = NO;
NSString *strAnswer = @"";
NSURLRequest *urlRequest = [NSURLRequest requestWithURL:[NSURL URLWithString:@"http://10.16.2.42/api/IniciarSesionMobile/GetConnectTest"]
cachePolicy:NSURLRequestReturnCacheDataElseLoad
timeoutInterval:35];
// Fetch the JSON response
NSData *urlData;
NSURLResponse *response;
NSError *error;
// Make synchronous request
urlData = [NSURLConnection sendSynchronousRequest:urlRequest
returningResponse:&response
error:&error];
// Construct a String around the Data from the response
strAnswer = [[NSString alloc] initWithData:urlData encoding:NSUTF8StringEncoding];