The implementation in CodeScanner.swift creates a coordinator instance to adopt AVCaptureMetadataOutputObjectsDelegate. Is there an advantage to using a coordinator instead of having ScannerViewController adopt the delegate?
The intent of a coordinator in SwiftUI seems to be to host delegates when you're using an existing ViewController. In this case, since a custom ViewController is needed, there doesn't seem to be any need for a second class.
The implementation in CodeScanner.swift creates a coordinator instance to adopt AVCaptureMetadataOutputObjectsDelegate. Is there an advantage to using a coordinator instead of having ScannerViewController adopt the delegate?
The intent of a coordinator in SwiftUI seems to be to host delegates when you're using an existing ViewController. In this case, since a custom ViewController is needed, there doesn't seem to be any need for a second class.