xcode 9 mach-o linker error

I converted my project from swift 3 to swift 4 and am using the latest version of xcode 9. On building, I get the following error :


Undefined symbols for architecture arm64:

"__T0So22AVCapturePhotoSettingsC12AVFoundation01_abC16SwiftNativeTypesACWP", referenced from: __T06SpotMi8CameraVCC12capturePhotoyypF in CameraVC.o "__T012AVFoundation39_AVCapturePhotoSettingsSwiftNativeTypesPAAE016availablePreviewc11PixelFormatG0SaySo8NSNumberCGfg", referenced from: __T06SpotMi8CameraVCC12capturePhotoyypF in CameraVC.o ld: symbol(s) not found for architecture arm64


I am not able to figureout the issue from the documentation also. Is there an issue with this version of xcode?


I am out of clues. Any help will be much appreciated.


Cheers!

Accepted Reply

The following AVFoundation APIs are temporarily unavailable in Swift (34378539):


AVCaptureDevice.Format.supportedColorSpaces
AVCaptureDevice.supportedFlashModes
AVCapturePhotoOutput.availablePhotoPixelFormatTypes
AVCapturePhotoOutput.availableRawPhotoPixelFormatTypes
AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypes


As a workaround, use the SwiftPrivate versions of these API by prepending each API with double underscore (`__`). For example, change `AVCaptureDevice.Format.supportedColorSpaces` to `AVCaptureDevice.Format.__supportedColorSpaces`.

Replies

The following AVFoundation APIs are temporarily unavailable in Swift (34378539):


AVCaptureDevice.Format.supportedColorSpaces
AVCaptureDevice.supportedFlashModes
AVCapturePhotoOutput.availablePhotoPixelFormatTypes
AVCapturePhotoOutput.availableRawPhotoPixelFormatTypes
AVCapturePhotoSettings.availablePreviewPhotoPixelFormatTypes


As a workaround, use the SwiftPrivate versions of these API by prepending each API with double underscore (`__`). For example, change `AVCaptureDevice.Format.supportedColorSpaces` to `AVCaptureDevice.Format.__supportedColorSpaces`.

I will be submitting my app to AppStore with these swiftPrivate variables. I hope these wont lead to any issues in reviewing process.

Yes, the App Review team is aware of this issue and those symbols should be allowed. If you run into any other issues, please post back here.