File AVFoundation / AVFoundation.h not found

When I create an iOS project and "Build Phases → Link binary with Libraries", I add the AVFoundation.framework library and use #import "<AVFoundation/AVFoundation.h>" . I get a compilation error:

"File AVFoundation / AVFoundation.h not found."

Here is my code:

 #import <UIKit/UIKit.h> #import "<AVFoundation/AVFoundation.h>" 

How can i solve this?

+4
source share
3 answers

Using

 #import <AVFoundation/AVFoundation.h> 

There are only two types of #import statements:

 #import <file.h> 

and

 #import "file.h" 

There is no such type: #import "<file.h>" you make a mistake here: #import "<AVFoundation/AVFoundation.h>"

In general, the #import form "QuartzCore / QuartzCore.h" is "find my own title if you cannot find it for the system header", and the "Find system header" form. In theory, locations are defined by the compiler, and they can be implemented differently on a given platform, but I have not come across a C compiler that does something else.

Link: fooobar.com/questions/1095746 / ...

+19
source

You have extra quotation marks.

Using

 #import <AVFoundation/AVFoundation.h> 

not

 #import "<AVFoundation/AVFoundation.h>" 
+9
source

please do not use

 #import "<AVFoundation/AVFoundation.h>" 

use this

 #import <AVFoundation/AVFoundation.h> 

we can import two types of library

the first is a system library developed by Apple

imported as

  #import <Library.h> 

The second is the classes implemented by the application developer.

as

 #import "Library.h" 
+1
source

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


All Articles