0

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?

AstroCB
  • 12,337
  • 20
  • 57
  • 73
KissTheCoder
  • 679
  • 6
  • 16

0 Answers0