有什么方法可以获得iPhone用户的名字? [英] Any way to get the name of iPhone user?

查看:136
本文介绍了有什么方法可以获得iPhone用户的名字?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

除了要求用户输入他们的名字外,还有什么方法可以将其从设备上删除吗?

Outside of asking the user to input their name, is there any way to get it off the device?

我试过这个库,试图提取名字来自 [UIDevice currentDevice] name] ,但这在很多情况下都不起作用:

I tried this library, which attempts to extract the name from [UIDevice currentDevice] name], but that doesn't work in a lot of situations:

https://github.com/tiboll/TLLNameFromDevice

用户的姓名是否存在于电话簿中或我们在iOS 6中可以访问的任何其他位置?

Is the user's name present in the phonebook or anywhere else that we have access to in iOS 6?

推荐答案

你可以去通过AddressBook中的所有联系人查看是否有任何联系人标记了所有者标志。

Well you could go through all the contacts in the AddressBook and see if any of them are marked with the owner flag.

请注意,执行此操作会弹出此应用程序想要访问地址簿消息。 Apple也不太热衷于这类事情。在应用程序评论指南中,指定应用程序未经用户许可不得使用个人信息。

Just be aware that doing this will popup the "this app wants access to the address book" message. Also Apple isn't very keen on these kind of things. In the app review guide it is specified that an app can not use personal information without the user's permission.

这篇关于有什么方法可以获得iPhone用户的名字?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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