Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AVFoundation/AVFoundation.h file not found

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?

like image 689
explorer Avatar asked Nov 05 '12 05:11

explorer


People also ask

What is AVFoundation used for?

AVFoundation combines several major technology areas that together encompass a wide range of tasks for inspecting, playing, capturing, and processing audiovisual media on Apple platforms.

What is AVFoundation framework?

AVFoundation is a multimedia framework with APIs in Objective-C and Swift, which provides high-level services for working with time-based audiovisual media on Apple Darwin-based operating systems: iOS, macOS, tvOS, and watchOS. It was first introduced in iOS 4 and has seen significant changes in iOS 5 and iOS 6.


3 Answers

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

like image 166
Midhun MP Avatar answered Oct 01 '22 01:10

Midhun MP


You have extra quotes.

Use

#import <AVFoundation/AVFoundation.h>

not

#import "<AVFoundation/AVFoundation.h>" 
like image 29
yeesterbunny Avatar answered Oct 01 '22 01:10

yeesterbunny


please do not use

#import "<AVFoundation/AVFoundation.h>"  

use this

#import <AVFoundation/AVFoundation.h>

we can import two type of library

first one is System Library which are developed by Apple developer

are imported as

 #import <Library.h>

Second one is Classes implemented by Application developer

like as

#import "Library.h"
like image 41
Gajendra Rawat Avatar answered Sep 30 '22 23:09

Gajendra Rawat