Undefined symbols for architecture arm64:

  "_OBJC_CLASS_$_AVCaptureAudioDataOutput", referenced from:

      objc-class-ref in libavdevice.a(avfoundation.o)

  "_OBJC_CLASS_$_AVCaptureVideoDataOutput", referenced from:

      objc-class-ref in libavdevice.a(avfoundation.o)

  "_OBJC_CLASS_$_AVCaptureDeviceInput", referenced from:

      objc-class-ref in libavdevice.a(avfoundation.o)

  "_OBJC_CLASS_$_AVCaptureSession", referenced from:

      objc-class-ref in libavdevice.a(avfoundation.o)

  "_OBJC_CLASS_$_AVCaptureDevice", referenced from:

      objc-class-ref in libavdevice.a(avfoundation.o)

ld: symbol(s) not found for architecture arm64

clang: error: linker command failed with exit code 1 (use -v to see invocation)

 

 以上错误是因为在工程中没有加入AVFoundation.framework库,Build Phases-->Link Binary With Libraries-->[+]-->AVFoundation.framework,即可。