Usually if you want to use AVCapturePhoto you do something like this:
func capturePhoto() {
let photoSettings = AVCapturePhotoSettings()
photoOutput?.capturePhoto(with: photoSettings, delegate: self)
}
Then when the photo is processed, photoOutput method is called:
internal func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: Error?) {
}
Question:
Is it possible to pass custom data to photoOutput via .capturePhoto? .metadata is only accessible on iOS and everytime I set a value with the .value() method I get
[General] [<AVCapturePhotoSettings 0x600003882080> valueWithUniqueID:inPropertyWithKey:]: lookup of unknown key: 'key'.