oneTimeCodes(preferredDuration:anchor:)
Stream one-time codes received by the system.
Declaration
func oneTimeCodes(preferredDuration: TimeInterval = 600, anchor: ASPresentationAnchor) async throws -> some AsyncSequence<ASVerificationCode, any Error>
Parameters
- preferredDuration:
How long the stream should ideally remain connected. This duration is not guaranteed and defaults to 10 minutes.
- anchor:
The anchor for which any UI should be presented from.
Discussion
When requested, the user may decide whether your app may receive one-time codes. This stream will automatically disconnect after a period of time.