UsherCodeGenerator

public class UsherCodeGenerator

Use this class to generate the Usher Code for a badge. The length of the Usher Code varies as follows device being online - 4 digits device being offline - 8 digits A QR code representation of the Usher Code is also provided in the delegate callback. The duration of the Usher Code varies by the badge and can be configured on the Usher Network Manager. A new code will be generated and published once the current code expires.

  • Initializer.

    Declaration

    Swift

    public init(forBadge badge: Badge, delegate: UsherCodeGeneratorDelegate)
    Parameters
    forBadge

    The badge for which to generate an Usher Code

    delegate

    An object that conforms to the UsherCodeGeneratorDelegate protocol that will receive notifications.

  • Start generation of a new Usher Code. The Usher Code will be generated only if the badge has no active security restrictions.

    Declaration

    Swift

    public func start()
  • Stop the Usher Code generation. It is recommended that the generation be stopped when not required. e.g. code displaying view goes out of screen.

    Declaration

    Swift

    public func stop()