Apple states:
Important iPad apps running in macOS cannot use the AVFoundation Capture classes. These apps should instead use UIImagePickerController for photo and video capture.
Source: https://developer.apple.com/forums/thread/124652