Skip to main content

Local Canonical Contact

The LocalCanonicalContact 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 information
  • contactId: String - Unique identifier for the local contact
  • sourceContactId: String - External identifier in the local database
  • canonicalContact: 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:
  1. Local Contacts (Contact) exist only on the user’s device and contain device-specific information like phone numbers and email addresses.
  2. Canonical Contacts (CanonicalContact) are server-side representations of users in your app’s ecosystem, with consistent identities across all devices.
  3. 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
This separation provides both privacy and powerful social features by only sharing the minimal information needed for user identification across devices.