Call a GSM Service #123*

若如初见. 提交于 2019-11-26 22:01:38

问题


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?


回答1:


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.




回答2:


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

Your example would be:

[NSURL URLWithString:@"tel:%23123%2A1%2A4%23"]


来源:https://stackoverflow.com/questions/4346301/call-a-gsm-service-123

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!