AirshipBaseContactProtocol
@objc(UAContactProtocol)
public protocol AirshipBaseContactProtocol : 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.
-
_getNamedUserID()
AsynchronousThe current named user ID if set through the SDK.
Declaration
Swift
@objc(getNamedUserIDWithCompletionHandler:) func _getNamedUserID() async -> String?
-
Associates the contact with the given named user identifier. The named user ID must be between 1 and 128 characters
Declaration
Swift
@objc func identify(_ namedUserID: String)
Parameters
namedUserID
The named user ID.
-
Disassociate the channel from its current contact, and create a new un-named contact.
Declaration
Swift
@objc func reset()
-
Can be called after the app performs a remote named user association for the channel instead of using
identify
orreset
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
@objc func notifyRemoteLogin()
-
Edits tags.
Declaration
Swift
@objc func editTagGroups() -> TagGroupsEditor
Return Value
A tag groups editor.
-
Edits tags.
Declaration
Swift
@objc func editTagGroups(_ editorBlock: (TagGroupsEditor) -> Void)
Parameters
editorBlock
The editor block with the editor. The editor will
apply
will be called after the block is executed. -
Edits attributes.
Declaration
Swift
@objc func editAttributes() -> AttributesEditor
Return Value
An attributes editor.
-
Edits attributes.
Declaration
Swift
@objc func editAttributes(_ editorBlock: (AttributesEditor) -> Void)
Parameters
editorBlock
The editor block with the editor. The editor will
apply
will be called after the block is executed. -
Associates an Email channel to the contact.
Declaration
Swift
@objc 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
@objc func registerSMS(_ msisdn: String, options: SMSRegistrationOptions)
Parameters
msisdn
The SMS msisdn.
options
The SMS channel registration options.
-
Associates an Open channel to the contact.
Declaration
Swift
@objc 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
@objc func associateChannel(_ channelID: String, type: ChannelType)
Parameters
channelID
The channel ID.
type
The channel type.
-
Begins a subscription list editing session
Declaration
Swift
@objc func editSubscriptionLists() -> ScopedSubscriptionListEditor
Return Value
A Scoped subscription list editor
-
Begins a subscription list editing session
Declaration
Swift
@objc func editSubscriptionLists( _ editorBlock: (ScopedSubscriptionListEditor) -> Void )
Parameters
editorBlock
A scoped subscription list editor block.
-
_fetchSubscriptionLists()
AsynchronousFetches subscription lists.
Declaration
Swift
@objc(fetchSubscriptionListsWithCompletionHandler:) func _fetchSubscriptionLists() async throws -> [String : ChannelScopes]
Return Value
Subscriptions lists.