AirshipContactProtocol

public protocol AirshipContactProtocol : AirshipBaseContactProtocol

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.

  • namedUserID Asynchronous

    Current named user ID

    Declaration

    Swift

    var namedUserID: String? { get async }
  • The named user ID current value publisher.

    Declaration

    Swift

    var namedUserIDPublisher: AnyPublisher<String?, Never> { get }
  • Conflict event publisher.

    Declaration

    Swift

    var conflictEventPublisher: AnyPublisher<ContactConflictEvent, Never> { get }
  • Notifies any edits to the subscription lists.

    Declaration

    Swift

    var subscriptionListEdits: AnyPublisher<ScopedSubscriptionListEdit, Never> { get }
  • Fetches subscription lists.

    Declaration

    Swift

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

    Return Value

    Subscriptions lists.

  • SMS validator delegate to allow overriding the default SMS validation

    Declaration

    Swift

    var smsValidatorDelegate: SMSValidatorDelegate? { get set }

    Return Value

    Bool indicating if SMS is valid.

  • validateSMS(_:sender:) Asynchronous

    Validates MSISDN

    Declaration

    Swift

    func validateSMS(_ msisdn: String, sender: String) async throws -> Bool

    Parameters

    msisdn

    The mobile phone number to validate.

    sender

    The identifier given to the sender of the SMS message.

  • Re-sends the double opt in prompt via the pending or registered channel.

    Declaration

    Swift

    func resend(_ channel: ContactChannel)

    Parameters

    channel

    The pending or registered channel to resend the double opt-in prompt to.

  • Opts out and disassociates channel

    Declaration

    Swift

    func disassociateChannel(_ channel: ContactChannel)

    Parameters

    channel

    The channel to opt-out and disassociate

  • Contact channel updates stream.

    Declaration

    Swift

    var contactChannelUpdates: AsyncStream<ContactChannelsResult> { get }
  • Contact channel updates publisher.

    Declaration

    Swift

    var contactChannelPublisher: AnyPublisher<ContactChannelsResult, Never> { get }