Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 10.4   10.5   11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1    Statistic    FMM    Blog  

CNContact.AddRelation

Adds an relation to a contact.

Component Version macOS Windows Linux Server iOS SDK
Contacts 8.4 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContact.AddRelation"; ContactIdentifier; Name; Label )   More

Parameters

Parameter Description Example
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"
Name The name to use. "Christian Schmitz"
Label The label to use.
For your convenience we translate Assistant, Brother, Child, Daughter, Father, Friend, Manager, Mother, Parent, Partner, Sister, Son and Spouse to the right values, so they get localized in display.
Default label is Other.
"Dad"

Result

Returns OK or error.

Description

Adds an relation to a contact.
This is a convenience function to add just one relation with a given label to the contact.
Please call CNContactStore.UpdateContact later to store the values.

See also

Example Databases

Created 1st August 2018, last changed 2nd August 2018


CNContact.AddPostalAddressJSON - CNContact.AddSocialProfile

Feedback: Report problem or ask question.




Links
MBS Xojo Chart Plugins

Start Chat