Type 'CameraPreview' does not conform to protocol 'UIViewRepresentable'

Hi everyone,

I'm working on a camera app, but there is an error and I don't know how to fix it. Can anyone help me?

Thanks, Robby Flockman

We can't do much with a screenshot of a tiny sample of your code, and truncated error messages! Please post more code, in a code block, using "Paste & Match Style" (to preserve formatting). Also post the error messages, in full.

Hi Robby, I can't see all your code, but from the error message I would check you satisfy the protocol, which means its expecting some methods and you may have some missing.

Right click on UIViewRepresentable -> Jump to definition

This should give you an idea of what is expected.

Type 'CameraPreview' does not conform to protocol 'UIViewRepresentable'
 
 
Q