Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
CNContactStore.Contacts
Queries all contacts.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Contacts | 8.5 | ✅ Yes | ❌ No | ❌ No | ❌ No | ✅ Yes |
MBS( "CNContactStore.Contacts" { ; unifyResults } ) More
Parameters
Parameter | Description | Example | Flags |
---|---|---|---|
unifyResults | Whether to unify results. 1 to unify contacts and 0 to return all invidivual contacts. Default is 1. |
1 | Optional |
Result
Returns list of contact identifiers or error.
Description
Queries all contacts.You an get the list unified, so contacts in several accounts are merged.
Or you get list of all contacts with those merged which appear in multiple accounts.
Seems like Addressbook.people and CNContactStore.Contacts with unifyResults = 0 is the same list.
Examples
Query names for all contacts:
While(
[
names = "";
// query list of contacts IDs
list = MBS( "CNContactStore.Contacts"; 1 );
count = ValueCount(list);
index = 1
] ;
index ≤ count ;
[
id = GetValue(list; index);
// query name for each ID
name = MBS( "CNContact.Name"; id);
names = names & name & ¶;
index = index + 1
] ;
// return all the names
names )
See also
- Addressbook.people
- CNContact.Name
- CNContactStore.ContactsMatchingEmailAddress
- CNContactStore.ContactsMatchingName
- CNContactStore.ContactsMatchingURL
- CNContactStore.Containers
- CNContactStore.Country
- CNContactStore.DataWithContacts
- CNContactStore.FetchContact
- CNContactStore.NewContact
Release notes
- Version 14.0
- Added CNContactStore.ContactsMatchingURL function.
- Version 13.4
- Fixed CNContactStore.Contacts to work better on newer macOS versions.
- Version 10.5
- Added CNContactStore.ContactsMatchingEmailAddress and CNContactStore.ContactsMatchingPhoneNumber functions.
- Version 10.1
- Fixed CNContactStore.Contacts, CNContactStore.UnifiedMeContact, CNContactStore.ContactsInGroup, CNContactStore.ContactsMatchingName and others to work if your iOS application has not the entitlement to access notes in contacts.
- Version 8.5
- Added CNContactStore.Contacts, CNContact.UnifiedContacts and CNContact.IsUnifiedWithContact functions.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 13.4pr2
- MBS FileMaker Plugin, version 10.1pr5
- MBS FileMaker Plugin, version 10.1pr2
- MBS FileMaker Plugin, version 8.5pr1
This function checks for a license.
Created 25th September 2018, last changed 14th June 2022
CNContactStore.AuthorizationStatus - CNContactStore.ContactsInContainer
