My normal Xcode project compiles completely fine but since I am using pods, I must open the xcworkspace project. This causes the 2 bottom lines of my code to be errors.
var session = AVCaptureSession()
session.sessionPreset = AVCaptureSession.Preset.photo
let captureDevice = AVCaptureDevice.default(for: AVMediaType.video)
The compiler states:
Type 'AVCaptureSession.Preset' (aka 'NSString') has no member 'photo'
and
Type 'AVMediaType' (aka 'NSString') has no member 'video'
I don't understand why it thinks they are NSStrings all of a sudden. How do I fix this?