core-data icon indicating copy to clipboard operation
core-data copied to clipboard

Xcode 9.2, Swift 4 Compile Errors

Open joshuabryson opened this issue 8 years ago • 1 comments

The CapureSession.swift file does not compile. the setup function should become:

fileprivate func setup() { #if !IOS_SIMULATOR 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.

joshuabryson avatar Dec 21 '17 19:12 joshuabryson

We'll update the code for the next round of fixes/updates of the book. Thanks for pointing this out.

floriankugler avatar Dec 30 '17 09:12 floriankugler