AVFoundation/AVFoundation.h file not found

avfoundation, file-not-found, ios, iphone, objective-c

Solution

Use

#import <AVFoundation/AVFoundation.h>

There is only two types of `#import` statements:

#import <file.h>

and

#import "file.h"

There is no type like : `#import "<file.h>"` you are making mistake here: `#import "<AVFoundation/AVFoundation.h>"`

In general the #import "QuartzCore/QuartzCore.h" form is "find my very own header, if you can't find it look for a system header", and the form is "find a system header". In theory the locations are compiler defined and they could be implemented differently on a given platform, but I haven't run into a C compiler that does anything different.

Reference: SO

Problem

When I create an iOS project,and "Build Phases -> Link binary with Libraries", I add the AVFoundation.framework lib and use `#import "<AVFoundation/AVFoundation.h>"`. I get a compilation error: "AVFoundation/AVFoundation.h file not found". Here's my code: ``` #import <UIKit/UIKit.h> #import "<AVFoundation/AVFoundation.h>" ``` How can I resolve this?

Original source

Related problems