AirshipContact

@objc(UAContact)
public final class AirshipContact : NSObject, AirshipContactProtocol, @unchecked Sendable
extension AirshipContact: AirshipComponent

Airship contact. A contact is distinct from a channel and represents a “user” within Airship. Contacts may be named and have channels associated with it.

  • Publishes all edits made to the subscription lists through the SDK

    Declaration

    Swift

    public var subscriptionListEdits: AnyPublisher<ScopedSubscriptionListEdit, Never> { get }
  • Declaration

    Swift

    public var conflictEventPublisher: AnyPublisher<ContactConflictEvent, Never> { get }
  • Declaration

    Swift

    public var namedUserIDPublisher: AnyPublisher<String?, Never> { get }
  • _getNamedUserID() Asynchronous

    Declaration

    Swift

    public func _getNamedUserID() async -> String?
  • namedUserID Asynchronous

    Declaration

    Swift

    public var namedUserID: String? { get async }
  • Declaration

    Swift

    public func airshipReady()
  • Identifies the contact.

    Declaration

    Swift

    public func identify(_ namedUserID: String)

    Parameters

    namedUserID

    The named user ID.

  • Resets the contact.

    Declaration

    Swift

    public func reset()
  • Can be called after the app performs a remote named user association for the channel instead of using identify or reset through the SDK. When called, the SDK will refresh the contact data. Applications should only call this method when the user login has changed.

    Declaration

    Swift

    public func notifyRemoteLogin()
  • Begins a tag groups editing session.

    Declaration

    Swift

    public func editTagGroups() -> TagGroupsEditor

    Return Value

    A TagGroupsEditor

  • Begins a tag groups editing session.

    Declaration

    Swift

    public func editTagGroups(_ editorBlock: (TagGroupsEditor) -> Void)

    Parameters

    editorBlock

    A tag groups editor block.

    Return Value

    A TagGroupsEditor

  • Begins an attribute editing session.

    Declaration

    Swift

    public func editAttributes() -> AttributesEditor

    Return Value

    An AttributesEditor

  • Begins an attribute editing session.

    Declaration

    Swift

    public func editAttributes(_ editorBlock: (AttributesEditor) -> Void)

    Parameters

    editorBlock

    An attributes editor block.

    Return Value

    An AttributesEditor

  • Associates an Email channel to the contact.

    Declaration

    Swift

    public func registerEmail(
        _ address: String,
        options: EmailRegistrationOptions
    )

    Parameters

    address

    The email address.

    options

    The email channel registration options.

  • Associates a SMS channel to the contact.

    Declaration

    Swift

    public func registerSMS(_ msisdn: String, options: SMSRegistrationOptions)

    Parameters

    msisdn

    The SMS Mobile Station International Subscriber Directory Number..

    options

    The SMS channel registration options.

  • Associates an open channel to the contact.

    Declaration

    Swift

    public func registerOpen(
        _ address: String,
        options: OpenRegistrationOptions
    )

    Parameters

    address

    The open channel address.

    options

    The open channel registration options.

  • Associates a channel to the contact.

    Declaration

    Swift

    public func associateChannel(_ channelID: String, type: ChannelType)

    Parameters

    channelID

    The channel ID.

    type

    The channel type.

  • Begins a subscription list editing session

    Declaration

    Swift

    public func editSubscriptionLists() -> ScopedSubscriptionListEditor

    Return Value

    A Scoped subscription list editor

  • Begins a subscription list editing session

    Declaration

    Swift

    public func editSubscriptionLists(
        _ editorBlock: (ScopedSubscriptionListEditor) -> Void
    )

    Parameters

    editorBlock

    A scoped subscription list editor block.

    Return Value

    A ScopedSubscriptionListEditor

  • Declaration

    Swift

    @objc(fetchSubscriptionListsWithCompletionHandler:)
    public func _fetchSubscriptionLists() async throws -> [String : ChannelScopes]
  • Declaration

    Swift

    public func fetchSubscriptionLists() async throws -> [String : [ChannelScope]]