iOS - 如何搜索“可搜索的” ABSource,带ABSourceType | kABSourceTypeSearchableMask [英] iOS - How to search a "searchable" ABSource, with ABSourceType | kABSourceTypeSearchableMask
问题描述
有没有人成功使用ABAddressBook框架搜索链接到iOS设备的Exchange GAL中的名称,或者其他?
Has anyone ever succeeded in searching for names in an Exchange GAL linked to an iOS device, using ABAddressBook framework, or otherwise?
我已成功获得所有来自存储在设备上的联系人的姓名 - 这一点很容易 - 但它不包括来自Exchange GAL的名称。
I've managed to get all the names from the contacts stored on the device - that bit's easy - but it doesn't include names from the Exchange GAL.
我还设法获得了ABSource为GAL。它的类型是: kABSourceTypeExchangeGAL = kABSourceTypeExchange | kABSourceTypeSearchableMask
I've also managed to get the ABSource for the GAL. It's type is: kABSourceTypeExchangeGAL = kABSourceTypeExchange | kABSourceTypeSearchableMask
这表明源是可搜索的,因为设置了 kABSourceTypeSearchableMask
位( kABSourceTypeSearchableMask = 0x01000000
),但如何搜索它是否是任何人的猜测?文档几乎不存在。
This suggests the source is searchable, given that the kABSourceTypeSearchableMask
bit is set (kABSourceTypeSearchableMask = 0x01000000
), but how to search it is anyone's guess? The documentation is almost non-existent.
下面列出了类似的stackoverflow问题,但没有一个为此提供解决方案。
There are similar stackoverflow questions listed below, but none of them provides a solution for this.
- 使用iOS地址簿api来搜索交换联系人
- ABAddressBook - - 搜索Exchange AddressBook来源?
- ABAddressBook ABSource and ABSourceType
- Using iOS Addressbook api to search exchange contacts
- ABAddressBook -- Search Exchange AddressBook Source?
- ABAddressBook ABSource and ABSourceType
ABAddressBookCopyArrayOfAllPeopleInSource(addressBook,sourceToSearch)
始终返回包含类型位 kABSourceTypeSearchableMask
的源的空数组,这表示您必须按名称搜索,而不是返回所有人,因为全球地址列表中可能有成千上万的人,所以我不希望它全部归还。
ABAddressBookCopyArrayOfAllPeopleInSource(addressBook, sourceToSearch)
always returns an empty array for sources that include the type bit kABSourceTypeSearchableMask
, which suggests that you have to search by name, rather than return "all people" because the Global Address List could have thousands and thousands of people in it, so I wouldn't expect it to return them all.
联系人应用程序允许您按名称搜索仅显示匹配的那些。在收件人:文本字段中输入文本时,邮件应用也是如此。
Contacts app allows you to search by name and shows only those that match. As does Mail app when entering text in the "To:" text field.
推荐答案
我很确定这是不允许的 - - 由微软..基于此 http://social.msdn.microsoft.com/Forums/en-US/85713cae-c969-4abd-836f-394c2ed815d9 / finding-contacts-in-exchange-global-address-list-using-ews-managed-api?forum = interchangevrdevelopment 和快速的wireshark跟踪,看起来GAL查询实际上是直接针对DC ......
I am fairly sure this is not allowed -- by Microsoft.. Based on this http://social.msdn.microsoft.com/Forums/en-US/85713cae-c969-4abd-836f-394c2ed815d9/finding-contacts-in-exchange-global-address-list-using-ews-managed-api?forum=exchangesvrdevelopment and a quick wireshark trace, it looks like GAL queries are really LDAP queries being run directly against the DC...
这篇关于iOS - 如何搜索“可搜索的” ABSource,带ABSourceType | kABSourceTypeSearchableMask的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!