URL Address

The ContactURLAddress model represents a URL (web address) associated with a contact in the ContactsManager SDK.

Properties

  • urlId: String - Unique identifier for the URL entry
  • value: String? - The actual URL
  • type: String? - The type or label for the URL (e.g., homepage, work, blog)
  • emoji: String? - An emoji icon associated with this URL
  • contact: Contact? - Reference to the parent contact that owns this URL

Usage Example

// Create a URL address
let urlAddress = ContactURLAddress(
    contactId: "contact-123",
    value: "https://example.com/portfolio",
    type: "portfolio",
    emoji: "🌐"
)

// Add to a contact
contact.urlAddresses.append(urlAddress)

// Access from a contact
if let firstURL = contact.urlAddresses.first {
    print("URL: \(firstURL.value ?? "None") (\(firstURL.type ?? "Unknown"))")
}