iPhone sdk:如何获取地址簿中所有电话号码的计数?

发布于 2024-08-28 09:03:53 字数 93 浏览 3 评论 0 原文

您好,我正在为我的 QA 部门开发一个应用程序。我需要以编程方式获取整个地址簿中有多少个电话号码。没有用户输入。只需单击一个按钮,然后即可获取整个地址簿中有多少个电话号码。

Hi i am developing an app for my QA department. I need to programically get how many phone numbers are there in the entire address book. No user input. Just click a button and then get how many phonenumbers are there in the ENTIRE addressbook.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

∝单色的世界 2024-09-04 09:03:53

我认为您正在寻找的是 ABGroupCopyArrayOfAllMembers。请参阅 AddressBook 编程指南QuickContacts 示例,了解有关使用 AB 框架的更多信息。

I think what you are looking for is ABGroupCopyArrayOfAllMembers. See the AddressBook Programming Guide and the QuickContacts example for more info on using the AB framework.

匿名。 2024-09-04 09:03:53

从我快速查看 AddressBook.sqlitedb 中的 ABMultiValue 可以看出,您可能会得到这样的结果:

1 - sqlite 到 /var/mobile/Library /AddressBook/AddressBook.sqlitedb

2 - 从 ABMultiValue 选择值 =>进入某个数组

3 - 计算其中与 /^[0-9 +]+$/ 匹配的所有内容,

四处寻找更多帮助来完成这些步骤

编辑:可能还有一些方法可以做到这一点方法:
如何获取某人的电话号码从通讯录中?

from what I can tell from a quick look at ABMultiValue in AddressBook.sqlitedb, you might get it like this:

1 - sqlite to /var/mobile/Library/AddressBook/AddressBook.sqlitedb

2 - SELECT value FROM ABMultiValue => into some array

3 - count everything in there that matches /^[0-9 +]+$/

look around for some more help doing these steps

Edit: there's probably also some way to do it with this method:
How do you get a persons phone number from the address book?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文