VGSCardScanCoordinator

@MainActor
public class VGSCardScanCoordinator : ObservableObject

Coordinates external card scanning integrations with a bound VGSTextField (typically a VGSCardTextField or its SwiftUI representable).

Responsibilities:

  • Holds weak reference to the target text field.

Usage:

  1. Instantiate and pass into a SwiftUI representable via .cardScanCoordinator(...).
  2. After a successful scan, automatically populate field & trigger validation.

Security:

  • Ensure scanned text is handled only in-memory until submitted or tokenized.
  • Avoid persisting scanned PAN in logs or user defaults.