Local Canonical Contact
TheLocalCanonicalContact
model bridges the gap between local device contacts and server-side user profiles. It provides a way to link a contact on the user’s device with their canonical representation in your app’s ecosystem, enabling powerful social features.
Properties
contact: Contact?
- The local device contact informationcontactId: String
- Unique identifier for the local contactsourceContactId: String
- External identifier in the local databasecanonicalContact: CanonicalContact
- Server-side canonical profile information
Usage Example
Understanding Local vs. Canonical Contacts
The relationship between local and canonical contacts is fundamental to the ContactsManager SDK:-
Local Contacts (
Contact
) exist only on the user’s device and contain device-specific information like phone numbers and email addresses. -
Canonical Contacts (
CanonicalContact
) are server-side representations of users in your app’s ecosystem, with consistent identities across all devices. -
Local Canonical Contacts (
LocalCanonicalContact
) create the mapping between these two worlds, enabling your app to:- Show which of a user’s contacts are also using your app
- Provide consistent identity for users across multiple devices
- Enable social features like follow/unfollow and activity feeds
- Maintain privacy by keeping sensitive contact details on the device
Related Models
- Contact - Local device contact information
- CanonicalContact - Server-side user profile information