Llamadas REST
Para que funcionen las llamadas hay que habilitar el proyecto a que acceda a URLs abiertas:
Opened my Projects info.plist file
Added a Key called NSAppTransportSecurity as a Dictionary.
Added a Subkey called NSAllowsArbitraryLoads as Boolean and set its value to YES as like following image.
[MBProgressHUD showHUDAddedTo:self.view animated:YES];
//ENVIAMOS A SEGUNDO PLANO
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[LORestManager sharedInstance] authorizationTokenStepB:self.textFieldEmail.text
password:self.textFieldPassword.text
returnHandler:^(int messageId, id json) {
//VOLVEMOS A PRIMER PLANO POR SI SE DEBE TOCAR INTERFICIE
dispatch_async(dispatch_get_main_queue(), ^{
if (messageId>=0){
//OK
}
[MBProgressHUD hideAllHUDsForView:self.view animated:YES];
});
}];
});