DefaultAirshipContact
public final class DefaultAirshipContact : AirshipContact, @unchecked Sendable
extension DefaultAirshipContact: AirshipPushableComponent
extension DefaultAirshipContact: 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.
-
Declaration
Swift
public var contactChannelUpdates: AsyncStream<ContactChannelsResult> { get } -
Declaration
Swift
public var contactChannelPublisher: AnyPublisher<ContactChannelsResult, Never> { get } -
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 } -
namedUserIDAsynchronousDeclaration
Swift
public var namedUserID: String? { get async } -
Declaration
Swift
public func airshipReady() -
Identifies the contact.
Declaration
Swift
public func identify(_ namedUserID: String)Parameters
namedUserIDThe 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
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
public func notifyRemoteLogin() -
Begins a tag groups editing session.
Declaration
Swift
public func editTagGroups() -> TagGroupsEditorReturn Value
A TagGroupsEditor
-
Begins a tag groups editing session.
Declaration
Swift
public func editTagGroups(_ editorBlock: (TagGroupsEditor) -> Void)Parameters
editorBlockA tag groups editor block.
Return Value
A TagGroupsEditor
-
Begins an attribute editing session.
Declaration
Swift
public func editAttributes() -> AttributesEditorReturn Value
An AttributesEditor
-
Begins an attribute editing session.
Declaration
Swift
public func editAttributes(_ editorBlock: (AttributesEditor) -> Void)Parameters
editorBlockAn attributes editor block.
Return Value
An AttributesEditor
-
Associates an Email channel to the contact.
Declaration
Swift
public func registerEmail( _ address: String, options: EmailRegistrationOptions )Parameters
addressThe email address.
optionsThe email channel registration options.
-
Associates a SMS channel to the contact.
Declaration
Swift
public func registerSMS(_ msisdn: String, options: SMSRegistrationOptions)Parameters
msisdnThe SMS Mobile Station International Subscriber Directory Number..
optionsThe SMS channel registration options.
-
Associates an open channel to the contact.
Declaration
Swift
public func registerOpen( _ address: String, options: OpenRegistrationOptions )Parameters
addressThe open channel address.
optionsThe open channel registration options.
-
Associates a channel to the contact.
Declaration
Swift
public func associateChannel( _ channelID: String, type: ChannelType )Parameters
channelIDThe channel ID.
typeThe channel type.
optionsThe SMS/email channel options
-
Resends an opt-in message
Declaration
Swift
public func resend(_ channel: ContactChannel)Parameters
channelIDThe channel ID.
typeThe channel type.
optionsThe SMS/email channel options
-
Disassociates a channel
Declaration
Swift
public func disassociateChannel(_ channel: ContactChannel)Parameters
channelThe channel to disassociate.
-
Begins a subscription list editing session
Declaration
Swift
public func editSubscriptionLists() -> ScopedSubscriptionListEditorReturn Value
A Scoped subscription list editor
-
Begins a subscription list editing session
Declaration
Swift
public func editSubscriptionLists( _ editorBlock: (ScopedSubscriptionListEditor) -> Void )Parameters
editorBlockA scoped subscription list editor block.
Return Value
A ScopedSubscriptionListEditor
-
fetchSubscriptionLists()AsynchronousDeclaration
Swift
public func fetchSubscriptionLists() async throws -> [String : [ChannelScope]] -
receivedRemoteNotification(_:Asynchronous) Declaration
Swift
@MainActor public func receivedRemoteNotification(_ notification: AirshipJSON) async -> UABackgroundFetchResult -
receivedNotificationResponse(_:Asynchronous) Declaration
Swift
@MainActor public func receivedNotificationResponse(_ response: UNNotificationResponse) async
View on GitHub