Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

CNContainer.Name

The name of the container.

Component Version macOS Windows Linux Server iOS SDK
Contacts 8.4 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContainer.Name"; ContainerIdentifier )   More

Parameters

Parameter Description Example
ContainerIdentifier The identifier for the container. "9892A5CC-964E-497A-B877-A47619F7493C:ABAccount"

Result

Returns name or error.

Description

The name of the container.
The container is the source of contacts, e.g. an account on iCloud.

Examples

Query names of containers:

While(
[
    names = "";
    // query list of container IDs
    list = MBS( "CNContactStore.Containers" );
    count = ValueCount(list);
    index = 1
] ;
    index ≤ count ;
[
    id = GetValue(list; index);
    // query name for each ID
    name = MBS( "CNContainer.Name"; id);
    names = names & id & " -> " &name & ¶;
    index = index + 1
] ;
// return all the names
names )

Example result:
9892A5CC-964E-497A-1234-A47619F7493C:ABAccount -> Mac.com
_local:ABAccount -> On my Mac

See also

Created 1st August 2018, last changed 14th June 2022


CNContactStore.UpdateContact - CNContainer.Type