Try Sample AVCAM from apple found error

前端 未结 4 812
野趣味
野趣味 2020-12-08 23:50

When I tried sample AVCAM swift with Xcode Version 9.0 beta 5 (9M202q). I found errors.

Undefined symbols for architecture x86_64:
\"__T0So22AVC

4条回答
  •  抹茶落季
    2020-12-09 00:15

    Xcode 9.0 beta 5 (9M202q) definitely has a problem with AVCam Swift revision 2017-06-06. Fortunately the problem is isolated to these three lines in CameraViewController.swift:

    if !photoSettings.availablePreviewPhotoPixelFormatTypes.isEmpty {
        photoSettings.previewPhotoFormat = [kCVPixelBufferPixelFormatTypeKey as String: photoSettings.availablePreviewPhotoPixelFormatTypes.first!]
    }
    

    Comment out the above code and AVCam will compile and run fine on a device running the latest iOS 11 beta.

提交回复
热议问题