I presume you've added the NSCameraUsageDescription | $(PRODUCT_NAME) key to Info.plist.
AKA Privacy - Camera Usage Description
When I build and run AVCam on my mac mini w/USB camera (Xcode 11.1/Swift/Catalyst), it succeeds/no errors, but then complains about not being able to access the default camera via an alert stating "Unable to capture media". I do not see a request to use dialog.
I'll play with it for while...
I received an answer from Apple after submitting a feedback ticket about this:
This issue behaves as intended.
We do document that we are not listing devices in Catalyst mode.
Important iPad apps running in macOS cannot use the AVFoundation Capture classes. These apps should instead use UIImagePickerController for photo and video capture.
Please close your feedback report, or let us know if this is still an issue for you.
So unless they update it in the future it's not possible to access the camera on a Mac from a Catalyst app.
This is terrible. I can't scan barcodes using UIImagePickerController.