AirshipContact
public protocol AirshipContact : AnyObject, Sendable
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.
-
namedUserIDAsynchronousCurrent 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 } -
fetchSubscriptionLists()AsynchronousFetches subscription lists.
Declaration
Swift
func fetchSubscriptionLists() async throws -> [String : [ChannelScope]]Return Value
Subscriptions lists.
-
Re-sends the double opt in prompt via the pending or registered channel.
Declaration
Swift
func resend(_ channel: ContactChannel)Parameters
channelThe pending or registered channel to resend the double opt-in prompt to.
-
Opts out and disassociates channel
Declaration
Swift
func disassociateChannel(_ channel: ContactChannel)Parameters
channelThe 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 } -
Associates the contact with the given named user identifier. The named user ID must be between 1 and 128 characters
Declaration
Swift
func identify(_ namedUserID: String)Parameters
namedUserIDThe named user ID.
-
Disassociate the channel from its current contact, and create a new un-named contact.
Declaration
Swift
func reset() -
Can be called after the app performs a remote named user association for the channel instead of using
identifyorresetthrough 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
func notifyRemoteLogin() -
Edits tags.
Declaration
Swift
func editTagGroups() -> TagGroupsEditorReturn Value
A tag groups editor.
-
Edits tags.
Declaration
Swift
func editTagGroups(_ editorBlock: (TagGroupsEditor) -> Void)Parameters
editorBlockThe editor block with the editor. The editor will
applywill be called after the block is executed. -
Edits attributes.
Declaration
Swift
func editAttributes() -> AttributesEditorReturn Value
An attributes editor.
-
Edits attributes.
Declaration
Swift
func editAttributes(_ editorBlock: (AttributesEditor) -> Void)Parameters
editorBlockThe editor block with the editor. The editor will
applywill be called after the block is executed. -
Associates an Email channel to the contact.
Declaration
Swift
func registerEmail(_ address: String, options: EmailRegistrationOptions)Parameters
addressThe email address.
optionsThe email channel registration options.
-
Associates a SMS channel to the contact.
Declaration
Swift
func registerSMS(_ msisdn: String, options: SMSRegistrationOptions)Parameters
msisdnThe SMS msisdn.
optionsThe SMS channel registration options.
-
Associates an Open channel to the contact.
Declaration
Swift
func registerOpen(_ address: String, options: OpenRegistrationOptions)Parameters
addressThe open channel address.
optionsThe open channel registration options.
-
Associates a channel to the contact.
Declaration
Swift
func associateChannel(_ channelID: String, type: ChannelType)Parameters
channelIDThe channel ID.
typeThe channel type.
-
Begins a subscription list editing session
Declaration
Swift
func editSubscriptionLists() -> ScopedSubscriptionListEditorReturn Value
A Scoped subscription list editor
-
Begins a subscription list editing session
Declaration
Swift
func editSubscriptionLists( _ editorBlock: (ScopedSubscriptionListEditor) -> Void )Parameters
editorBlockA scoped subscription list editor block.
View on GitHub