我可以通过在ios 6中请求权限来获取用户的电话号码吗? [英] Can I get user's phone number by requesting for permission in ios 6?

查看:284
本文介绍了我可以通过在ios 6中请求权限来获取用户的电话号码吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个需要使用者电话号码的IOS6应用程式,



有没有办法要求使用者取得权限,并以程序化的方式取得号码? / p>

或者他必须手动输入?



我使用Xcode 4.5, p>

解决方案

您无法通过iOS中的任何简单的API获取手机。有可能是通过技术实现的方法描述在这个相关问题,但这是几岁,苹果可能已经关闭这个洞(使用未记录的密钥)。我也想知道苹果是不会允许在App Store上的应用程序的隐私的原因。 可能不



如果您提示他/她,您必须信任用户输入正确的电话号码。


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..

解决方案

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.

这篇关于我可以通过在ios 6中请求权限来获取用户的电话号码吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆