Platforms to show: All Mac Windows Linux Cross-Platform

Back to CNContactMBS class.

CNContactMBS.areKeysAvailable(keyDescriptors() as CNKeyDescriptorMBS) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Determines whether all contact property values for the specified keys are fetched.

The isKeyAvailable or areKeysAvailable methods are used where you are not certain of the keys that when fetched. If this method returns false, refetch the contact using the contact identifier and the keys you want to fetch. Accessing a property that was not fetched will throw an CNContactPropertyNotFetchedExceptionName exception.

CNContactMBS.Constructor   Private

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
The private constructor.

CNContactMBS.contactRelations as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled relations for the contact.

This property is an array of CNLabeledValue objects, each of which has a label and a CNContactRelation value. This property was previously known as related names.

CNContactMBS.copy as CNContactMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Create a copy of the contact object.

CNContactMBS.dates as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array containing labeled Gregorian dates.

This property is an array of CNLabeledValue objects, each of which has an NSString label and NSDateComponents value. You can use this property to store Gregorian dates such as anniversaries. Day and month components are required and year is optional. The calendar component can be nil or NSCalendarIdentifierGregorian. All other date components are invalid and including them results in an NSError object that includes the key paths of the invalid components and the error code CNErrorCodeValidationConfigurationError.

CNContactMBS.emailAddresses as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled email addresses for the contact.

This property is an array of CNLabeledValue objects, each of which has a label and an NSString that contains the email address.

CNContactMBS.instantMessageAddresses as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled IM addresses for the contact.

This property is an array of CNLabeledValue objects, each of which has a label and a CNInstantMessageAddress value.

Some examples using this method:

CNContactMBS.isKeyAvailable(key as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Determines whether the contact property value for the specified key is fetched.

The isKeyAvailable or areKeysAvailable methods are used when you are not certain of the keys that were fetched. If this method returns false, refetch the contact using the contact identifier and the keys you want to fetch. Accessing a property that was not fetched will throw CNContactPropertyNotFetchedExceptionName.

Some examples using this method:

CNContactMBS.isUnifiedWithContactWithIdentifier(contactIdentifier as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Returns true if the receiver was fetched as a unified contact and includes the contact having contactIdentifier in its unification.

CNContactMBS.mutableCopy as CNMutableContactMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Creates a mutable copy of this contact.

CNContactMBS.phoneNumbers as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled phone numbers for a contact.

This property is an array of CNLabeledValue objects, each of which has a label and a CNPhoneNumber value.

Some examples using this method:

CNContactMBS.postalAddresses as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled postal addresses for a contact.
Example
Dim c As CNContactMBS // your contact

Dim postalAddresses() As CNLabeledValueMBS = c.postalAddresses
For Each postalAddresse As CNLabeledValueMBS In postalAddresses

Dim p As CNPostalAddressMBS = postalAddresse.Value

MsgBox p.Street + EndOfLine + p.PostalCode + " " + p.City
Next

This property is an array of CNLabeledValue objects, each of which has a label and a CNPostalAddress value.

Some examples using this method:

CNContactMBS.socialProfiles as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled social profiles for a contact.

This property is an array of CNLabeledValue objects, each of which has a label and a CNSocialProfile value.

Some examples using this method:

CNContactMBS.urlAddresses as CNLabeledValueMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 16.3 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
An array of labeled URL addresses for a contact.

This property is an array of CNLabeledValue objects, each of which has a label and an NSString value that contains the URL.

CNContactMBS.valueForKey(key as String) as Variant

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Contacts MBS Mac64bit Plugin 17.2 ✅ Yes ❌ No ❌ No ✅ Yes Desktop & iOS
Queries value for a given key.
Example
// your contact
dim c as CNContactMBS

dim value as Variant = c.valueForKey(c.CNContactPreviousFamilyNameKey)
if value = nil then
// empty
else
MsgBox value.StringValue
end if

Normally you use the properties, but if you loop over a list of keys, you can use this function to query value for key.

The items on this page are in the following plugins: MBS Mac64bit Plugin.


The biggest plugin in space...