Can I get user's phone number by requesting for permission in ios 6? [duplicate]

大兔子大兔子 提交于 2019-12-01 08:12:49

问题


I am building an IOS6 app which requires the user's phone number,

Is there a way to ask the user for permission and get the number in programmatic way?

Or he has to manually type it in?

I am using Xcode 4.5 if it matters..


回答1:


You can't get the phone via any easy API within iOS. There might be a way to do it via the technique described in this related question, but this is a few years old and Apple may have closed this hole (which uses an undocumented key). I also wonder if Apple wouldn't allow the app on the App Store for privacy reasons. Probably not.

You'll have to trust the user to type in the correct phone number if you prompt him/her to.



来源:https://stackoverflow.com/questions/18296057/can-i-get-users-phone-number-by-requesting-for-permission-in-ios-6

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