Reputation: 905
i have to check that whether a call made on a number by code is success or not ,if not then i have to make another call on another number.....
-(IBAction)callPhone:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel:2135554321"]];
}
Upvotes: 1
Views: 649
Reputation: 12490
You can refer CoreTelephony Framework (CTCall Class Reference).This class has a property callState
that returns states of cellular calls i.e. dialing, incoming, connected, or disconnected.
Upvotes: 3
Reputation: 92316
You cannot. Apple does not provide you any information about calls at all. You won't know whether the phone actually tried making the call (other than openURL:
might return NO if the URL was invalid or some other error occurred).
This is by design and intended to protect the users' privacy.
Upvotes: 1