1

I want to call a GSM-Servicenumber of my provider, but the iPhone won't give a reaction. When I try the same with a regular number it works.

[[UIApplication sharedApplication]
                openURL:[NSURL URLWithString:@"tel:#123*1*4#"]
];

Have anyone an idea to get the Phone dial the GSM-Code?

Cœur
  • 37,241
  • 25
  • 195
  • 267
endo.anaconda
  • 2,449
  • 4
  • 29
  • 55
  • 1
    See this question: http://stackoverflow.com/questions/1478402/how-to-send-ussd-request-through-programming-on-iphone-os - it seems your only option is calling private CTCallDialWithID function from CoreTelephony framework – Vladimir Dec 03 '10 at 14:37
  • 1
    @Vladimir thanks for updating ,But is it legal or illegal use coreTelephone and CTCallDialWithID ?? is it private or public ?? can it casing apple rejection for my app?? – Adel Mar 30 '12 at 11:55
  • @cocos2dman, it is private method and you can't use it in application intended to be posted on Appstore – Vladimir Mar 30 '12 at 11:59

2 Answers2

3

it is not possible to use gsm-codes with public methods

See Apples Documentation about Phone Links:

To prevent users from maliciously redirecting phone calls or changing the behavior of a phone or account, the Phone app supports most, but not all, of the special characters in the tel scheme. Specifically, if a URL contains the * or # characters, the Phone app does not attempt to dial the corresponding phone number.

Matthias Bauch
  • 89,811
  • 20
  • 225
  • 247
endo.anaconda
  • 2,449
  • 4
  • 29
  • 55
0

Replace * with %2A and # with %23.

Your example would be:

[NSURL URLWithString:@"tel:%23123%2A1%2A4%23"]
Cœur
  • 37,241
  • 25
  • 195
  • 267