Open joshuabryson opened 6 years ago
The CapureSession.swift file does not compile. the setup function should become:
`fileprivate func setup() {
session.sessionPreset = AVCaptureSession.Preset.photo let discovery = AVCaptureDevice.DiscoverySession(deviceTypes: [.builtInWideAngleCamera], mediaType: AVMediaType.video, position: .back) if let camera = discovery.devices.first { let input = try! AVCaptureDeviceInput(device: camera) if session.canAddInput(input) { session.addInput(input) } } photoOutput = AVCapturePhotoOutput() if self.session.canAddOutput(photoOutput) { self.session.addOutput(photoOutput) } #endif
}`
This is after accepting Xcode's automatic fixes.
We'll update the code for the next round of fixes/updates of the book. Thanks for pointing this out.
The CapureSession.swift file does not compile. the setup function should become:
`fileprivate func setup() {
if !IOS_SIMULATOR
}`
This is after accepting Xcode's automatic fixes.