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: 9.5   10.0   10.1   10.2   10.3   10.4   10.5   11.0   11.1   11.2    Statistic    FMM    Blog  

CNContactStore.DeleteContact

Delete a contact from the contact store.

Component Version macOS Windows Linux Server iOS SDK
Contacts 8.4 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "CNContactStore.DeleteContact"; ContactIdentifier )   More

Parameters

Parameter Description Example
ContactIdentifier The contact identifier. "46B1E34D-58F9-4B6B-A80D-0F71ABB87A0E"

Result

Returns OK or error.

Description

Delete a contact from the contact store.

Examples

Delete contact:

If [ Length ( Contacts::ContactID ) = 0 ]
    Show Custom Dialog [ "Failed to delete a contact" ; "No ID in field" ]
Else
    Set Variable [ $r ; Value: MBS( "CNContactStore.DeleteContact"; Contacts::ContactID) ]
    If [ MBS("IsError") ]
        Show Custom Dialog [ "Failed to delete a contact" ; $r ]
    Else
        Set Field [ Contacts::ContactID ; "" ]
    End If
End If

See also

Example Databases

Created 1st August 2018, last changed 6th August 2018


CNContactStore.DefaultContainerIdentifier - CNContactStore.DeleteGroup

Feedback: Report problem or ask question.