斯威夫特,我想从设备中获取电话号码(未拒绝)和电子邮件 [英] Swift, I want to get phone number(not udid) and email from device

查看:49
本文介绍了斯威夫特,我想从设备中获取电话号码(未拒绝)和电子邮件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

全部我正在开发应用程序,它包含从设备获取电话号码和电子邮件的功能.我看了网上的一些样本,但所有样本都是关于唯一ID的.我如何从设备获取电话号码和电子邮件?有没有在这方面有经验的人?

all I'm developing app and it contains function which gets phone number and email from device. I've looked at some samples on internet but all of them are about unique id. How can i get phone number and email from device? Is there anybody who has experience in this area?

推荐答案

Apple从您的应用程序内部删除了对此数据的访问.您可能无法从设备访问用户的电话号码.相反,您必须要求他们在文本字段或其他内容中输入它.

Apple has removed access to this data from inside your app. You may not access the user's phone number from the device. You instead must require them to enter it in a text field or something.

"出于安全原因,iPhone操作系统限制了一个应用程序(包括其首选项和数据)到文件系统中的唯一位置.此限制是称为安全性"的安全功能的一部分.应用程序的沙箱".沙箱是一组细粒度的控件限制应用程序对文件,首选项,网络的访问资源,硬件等."

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

该设备的电话号码在您应用程序的内部不可用容器.您需要将您的应用程序修改为只读在目录容器中,然后将二进制文件重新提交到iTunes连接以便重新考虑您的应用程序商店.

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.

这篇关于斯威夫特,我想从设备中获取电话号码(未拒绝)和电子邮件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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