Contents

setAutoupdate(_:interval:)

Sets the authorization view to update itself at a specific interval.

Declaration

func setAutoupdate(_ autoupdate: Bool, interval: TimeInterval)

Parameters

  • autoupdate:

    Specifies whether the authorization view should update itself automatically. Set to True to enable autoupdates.

  • interval:

    If autoupdate is True, sets the interval at which updates take place, in seconds.

Discussion

If autoupdates are enabled and the authorization times out (for example), the authorization view automatically relocks. If autoupdates are disabled, you have to call the updateStatus(_:) method to manually update the view if the status changes when the user has not clicked on the lock icon. Autoupdates are disabled by default. Because autoupdates poll, they can affect system performance. For that reason, you might want to set a time interval so that the polling does not take place as often.

See Also

Setting up the authorization view