Update 15 Sept 2017:
Official response from Apple:
Our apologies. For apps using Swift 3.2 or Swift 4.0, several AVFoundation
capture APIs (public extensions on external protocol) were inadvertently
marked private in Xpre 9. The following AVFoundation API are temporarily
unavailable:
AVCaptureDevice.Format.supportedColorSpaces AVCaptureDevice.supportedFlashModes AVCapturePhotoOutput.availablePhotoPixelFormatTypes AVCapturePhotoOutput.availableRawPhotoPixelFormatTypes AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypesAs a workaround you can use the SwiftPrivate versions of these API by
prepending each API with double underscore (__). For example, changeAVCaptureDevice.Format.supportedColorSpacestoAVCaptureDevice.Format.__supportedColorSpaces.
I can confirm using
__availablePreviewPhotoPixelFormatTypesfixes the build
errors.
E.g.
let settings = AVCapturePhotoSettings()let previewPixelType = settings.__availablePreviewPhotoPixelFormatTypes.first!
Source: https://forums.developer.apple.com/thread/86810#259270



