How to hide phone number when calling

荒凉一梦 提交于 2020-01-17 12:42:54

问题


My app allows the user to make a phone call but I need to hide the number I'm calling to because it has a secret code within it. Is there any way to achieve this?

When I say "hide the number", I mean the phone number that appears in the the confirmation UIAlertView before calling and, if possible, in navigation bar when the call is in process.


回答1:


Most definitely not. The phone number that gets passed to the OS when making the call cannot be modified or hidden from the user. (What if your app dialed 911?)

Also, how is a "secret code" passed via a telephone number?




回答2:


Are you using the native phone number recognition code within a web view, or is this a custom button in your app.

In an app I've created, I have a button that the user can tap to call a phone number. This button presents a UIAlertView that I create myself (and therefore have complete control over what it says), and then in the alertView:didClickButtonAtIndex: delegate method, I do:

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tel://5555555555"]];

to initiate the call.




回答3:


I think if you try to modify the way how ios Phone app works, your app might be rejected. I'm almost sure they will not happy to let your app dail a number without user's knowledge.



来源:https://stackoverflow.com/questions/10934562/how-to-hide-phone-number-when-calling

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