views:

124

answers:

1

Our application lets users call phone numbers. Users would like to be able to block their caller ID.

On other platforms, we let the user specify a custom dialing prefix. For instance, on my cell provider it's #31#.

I've tried two approaches so far.

First:

id url = [NSURL URLWithString: @"tel:#31#0000000"]
// produces nil

Second:

id encoder = ["#31#0000000" stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
// produces %2331%230000000
id url = [NSURL URLWithString: [NSString stringWithFormat: @"tel:%@", encoded]];
// produces a valid-looking NSURL which doesn't do anything

I'm thinking at this point that I'm just not allowed to dial # and *, even from a Cocoa touch application. (I know it's not allowed from a web app.) Is this true, or am I missing something obvious?

+1  A: 

It looks like there's intentionally no way to do this.

Steven Fisher