I am creating an iPhone application which will manage calls. But I am not understanding how can I manage it. Can anyone clearify my issue, please provide me code if possible. Thank you.
The example I have provided below will be helpful and solve your problem because I have also use it in our own application. This code will execute only on Device not on simulator:
NSString *tel_Number = @"+913337979111"; NSURL *tel_URL = [NSURL URLWithString:[NSString stringWithFormat:@"telprompt:%@",tel_Number]]; if ([[UIApplication sharedApplication] canOpenURL:tel_URL]) { [[UIApplication sharedApplication] openURL:tel_URL]; } else { UIAlert *alert = [[UIAlertView alloc]initWithTitle:@"Alert" message:@"Calling functionality is not available in simulator, please use Device!" delegate:nil cancelButtonTitle:@"ok" otherButtonTitles:nil, nil]; [alert show]; }
Join MindStick Community
You need to log in or register to vote on answers or questions.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
The example I have provided below will be helpful and solve your problem because I have also use it in our own application.
This code will execute only on Device not on simulator: