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

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

问题描述

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

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

推荐答案

冒着给负分的风险,我想建议排名最高的解决方案(目前是第一个响应)违反了截至 11 月 5 日的最新 SDK 协议,2009. 我们的申请刚刚被拒绝使用.以下是 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天全站免登陆