views:

41

answers:

2

I want to dial a number from IPhone simulator for India. I have tried this on a button click:

-(void)makeaCall
{
NSURL *phoneNumber = [[NSURL alloc] initWithString: @"tel:1-800-180-2222"];
[[UIApplication sharedApplication] openURL: phoneNumber];
}

But it's not showing any action of dialing any number. Please help me with this.

+1  A: 

You might have to try that on a real phone, the simulator is a simulator after all and might not be able to make calls.

willcodejavaforfood
it will not show even dialing of number..??
I should not have posted this as an answer since I don't really know as I've never tried it. It does not seem unreasonable that the iPhone Simulator would not be able to do this. Sorry mate.
willcodejavaforfood
+2  A: 

you can't make a phone call from the simulator you will need a real phone for that.

but you can simulate an incoming call by selecting Hardware > Toggle In-Call Status Bar. also the incoming call should trigger in the app delegate the method applicationWillResignActive.

SorinA.
it will not show even dialing of number..??
not even that because the simulator doesn't have that feature...not yet anyway...
SorinA.
Ok.THanks a lot.