以编程方式在iOS中获取自己的电话号码 [英] Programmatically get own phone number in iOS

查看:75
本文介绍了以编程方式在iOS中获取自己的电话号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法通过iPhone SDK的标准API获取自己的电话号码?

Is there any way to get own phone number by standard APIs from iPhone SDK?

推荐答案

冒着被否定的风险标记,我想建议排名最高的解决方案(目前是第一个响应)违反了截至2009年11月5日的最新SDK协议。我们的应用程序因使用它而被拒绝。以下是Apple的回复:

At the risk of getting negative marks, I want to suggest that the highest ranking solution (currently the first response) violates the latest SDK Agreement as of Nov 5, 2009. Our application was just rejected for using it. Here's the response from Apple:

出于安全考虑,iPhone OS将应用程序(包括其首选项和数据)限制在文件系统中的唯一位置。此限制是安全功能的一部分,称为应用程序的沙箱。沙箱是一组细粒度的控件,限制了应用程序对文件,首选项,网络资源,硬件等的访问。



设备的电话号码在应用程序的容器中不可用。您需要将应用程序修改为只在目录容器中读取,然后将二进制文件重新提交到iTunes Connect,以便重新考虑App Store的应用程序。

"For security reasons, iPhone OS restricts an application (including its preferences and data) to a unique location in the file system. This restriction is part of the security feature known as the application's "sandbox." The sandbox is a set of fine-grained controls limiting an application's access to files, preferences, network resources, hardware, and so on."

The device's phone number is not available within your application's container. You will need to revise your application to read only within your directory container and resubmit your binary to iTunes Connect in order for your application to be reconsidered for the App Store.

这真是令人失望,因为我们想让用户不必输入他们自己的电话号码。

This was a real disappointment since we wanted to spare the user having to enter their own phone number.

这篇关于以编程方式在iOS中获取自己的电话号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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