Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Semantic issue: Use of undeclared identifier when adding Framework class references

I've added some frameworks into my project, through the Targets -> Build Phases -> Link binary with Libraries. In particular, I am talking about the AVFoundation.framework. I've also added all the frameworks into the Frameworks folder in the project navigator.

However, when I try to reference classes in the linked frameworks, I'm getting "Semantic issue - Use of undeclared identifier" errors.

For example, I'm getting these errors in the two bottom lines:

    - (void)viewDidLoad {
    [super viewDidLoad];
    AVCaptureSession *session = [[AVCaptureSession alloc] init];
    session.sessionPreset = AVCaptureSessionPresetMedium;
}

I'm wondering if the frameworks are being properly linked to my project. So, how can I solve this? I must say that I am new to iOs and ObjC development.

Thank you

like image 513
MobileCushion Avatar asked Sep 25 '12 09:09

MobileCushion


1 Answers

Looks like You forgot:

#import <AVFoundation/AVCaptureSession.h>
like image 98
CAMOBAP Avatar answered Sep 30 '22 18:09

CAMOBAP