ExposureSubmissionQRScannerViewModel

class ExposureSubmissionQRScannerViewModel : NSObject, AVCaptureMetadataOutputObjectsDelegate

Undocumented

Init

Protocol AVCaptureMetadataOutputObjectsDelegate

  • Undocumented

    Declaration

    Swift

    func metadataOutput(
    	_: AVCaptureMetadataOutput,
    	didOutput metadataObjects: [AVMetadataObject],
    	from _: AVCaptureConnection
    )

Internal

  • Undocumented

    Declaration

    Swift

    let onError: (QRScannerError, _ reactivateScanning: @escaping () -> Void) -> Void
  • Undocumented

    Declaration

    Swift

    let onCancel: () -> Void
  • Undocumented

    Declaration

    Swift

    func activateScanning()
  • Undocumented

    Declaration

    Swift

    func deactivateScanning()
  • Undocumented

    Declaration

    Swift

    func didScan(metadataObjects: [MetadataObject])
  • Sanitizes the input string and extracts a guid.

    • the input needs to start with https://localhost/?
    • the input must not ne longer than 150 chars and cannot be empty
    • the guid contains only the following characters: a-f, A-F, 0-9,-
    • the guid is a well formatted string (6-8-4-4-4-12) with length 43 (6 chars encode a random number, 32 chars for the uuid, 5 chars are separators)

    Declaration

    Swift

    func extractGuid(from input: String) -> String?