One Logo Pool Ball
AuthenticationServices · IOS API REFERENCE

ASDeliveredVerificationCodesManager

class · iOS 27.0+ · SDK 27.1

class ASDeliveredVerificationCodesManager

This class allows interacting with one-time codes delivered to the system. The codes may be delivered from many different sources, for example, email or SMS.

Members (3)

method · iOS 27.0+

oneTimeCodes

TypeScript
oneTimeCodes(preferredDuration: number, anchor: _UIKit_UIWindow): Promise<SDKHandle>
Swift declaration
func oneTimeCodes(preferredDuration: TimeInterval, anchor: ASPresentationAnchor) async throws -> some AsyncSequence<ASVerificationCode, any Error>

Stream one-time codes received by the system. When requested, the user may decide whether your app may receive one-time codes. This stream will automatically disconnect after a period of time. - Parameters: - preferredDuration: How long the stream should ideally remain connected. This duration is not guaranteed. - anchor: The anchor for which any UI should be presented from. - Throws: `ASDeliveredVerificationCodesManager.VerificationError` if one-time codes can not be delivered. - Note: Only enabled credential providers may call this method.

method · iOS 27.0+

consumeOneTimeCode

TypeScript
consumeOneTimeCode(oneTimeCode: ASVerificationCode): Promise<void>
Swift declaration
func consumeOneTimeCode(_ oneTimeCode: ASVerificationCode) async throws

Mark a one-time code as "consumed" by the current process. A code should only be marked as consumed if it was submitted to a service for the purposes of authentication. Consuming a code will mark a code's containing message as read in the Messages and Mail apps. Depending on the user's preference, this may also delete the code's containing message. - Parameters: - oneTimeCode: The code to mark as consumed. - Throws: `ASDeliveredVerificationCodesManager.VerificationError` if the system failed to accept the update. - Note: Only consume codes that you submit to a service. You should make a best effort to ensure it is accepted before calling this.

init · iOS 27.0+

init

TypeScript
static init(): ASDeliveredVerificationCodesManager
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All AuthenticationServices types →