The Contact
module in the Scripting app allows you to access and manage contacts on the device. You can create, query, update, and delete contacts, as well as manage contact groups and containers.
Type | Description |
---|---|
ContactInfo | Represents detailed information of a single contact. |
ContactContainer | Represents a contact storage container, such as local, Exchange, or CardDAV. |
ContactGroup | Represents a contact group for categorizing contacts. |
ContactLabeledValue | A labeled value, such as phone number or email address. |
ContactPostalAddress | Represents a postal address. |
ContactSocialProfile | Represents social profile information. |
ContactInstantMessageAddress | Represents instant messaging account information. |
givenName
or familyName
is required.containerIdentifier
. If not provided, the contact is added to the default container.identifier
is required.fetchImageData
to true
only if you need the contact's image data.Container types:
unassigned
local
exchange
cardDAV
try-catch
.imageData
should only be fetched if necessary to reduce memory usage.identifier
is valid when performing update or delete operations.