Posts

Post not yet marked as solved
0 Replies
424 Views
Since updating to Xcode 12, I have had a build time error, but only when compiling for the Simulator. (arm7 & arm64 compilations have no errors and the app runs without runtime errors.) These build errors are all related to AVCaptureDevice.Format from AVFoundation. The error says that AVCaptureDevice.Format doesn't have a property/member named 'supportedColorSpaces'. Below are the errors in some context. I'm at a loss for why I would see this during simulator compiles only. The property clearly exists in the latest documentation. - https://developer.apple.com/documentation/avfoundation/avcapturedevice/format and has for a long time. Can anyone give me a clue what the cause might be? let format: AVCaptureDevice.Format = ... ... // Error: Value of type 'AVCaptureDevice.Format' has no member 'supportedColorSpaces' if format.supportedColorSpaces.contains(AVCaptureColorSpace.P3_D65) { 		videoDevice.activeColorSpace = AVCaptureColorSpace.P3_D65 } let device videoDeviceInput: AVCaptureDeviceInput = ... ... // Error: Value of type 'AVCaptureDevice.Format' has no member 'supportedColorSpaces' if videoDeviceInput.device.activeFormat.supportedColorSpaces.contains(AVCaptureColorSpace.P3_D65) { 		... }
Posted Last updated
.