what do you mean by "does not work"?
your code doesn't compile, primarily because UIKit is not available on macOS (AppKit is, so your UIViews should be NSViews). Even so, in setupCamera you refer to a variable called 'view' which is not declared.
Topic:
Community
SubTopic:
Swift Student Challenge
Tags: