IOS SDK4.0 AVFoundation!

I added AVFoundation.framework I wrote "#import" at the top of the file.

I used the AVCaptureSession AVCaptureDevice AVCaptureDeviceInput class ... in my code.

But when I create it, Xcode told me about errors that "AVCaptureSession is not declared", "AVCaptureDevice uneclared" ...

What about him? What should I do for this?

Many thanks!

+3
source share
2 answers

Did you build it for a simulator? If so, try building for the device; these classes will not compile for the simulator.

+6
source

add import

#import <AVFoundation/AVFoundation.h>

in the header file! and you are ready to go to the simulator

0

Source: https://habr.com/ru/post/1772839/


All Articles