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?
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.
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.
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
You have extra quotes.
Use
#import <AVFoundation/AVFoundation.h>
not
#import "<AVFoundation/AVFoundation.h>"
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"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With