iphone - 找不到 AVFoundation/AVFoundation.h 文件

标签 iphone ios objective-c avfoundation file-not-found

当我创建一个 iOS 项目和“Build Phases -> Link binary with Libraries”时,我添加了 AVFoundation.framework 库并使用 #import "<AVFoundation/AVFoundation.h>" .我收到一个编译错误:

"AVFoundation/AVFoundation.h file not found".

这是我的代码:

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

我该如何解决?

最佳答案

使用

#import <AVFoundation/AVFoundation.h>

#import只有两种类型声明:

#import <file.h>

#import "file.h"

没有像这样的类型:#import "<file.h>"你在这里犯了错误:#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.

引用:SO

关于iphone - 找不到 AVFoundation/AVFoundation.h 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13226543/

相关文章:

iphone - Android - 数据存储?

ios - 我怎样才能让我的 UISwitch 做一些事情?

ios - 今天扩展 "Unable To Load"

android - iOS 和 Android 上的 Firebase 邀请 - 是否可以在不显示 UI 的情况下生成共享链接?

ios - xcode: ios 动态框架在提交时显示 "Entitlements 0"

iphone - ASIHttpRequest 替换和图像缓存

android - 如何在 Xamarin 中安全地存储 key ?

iPhone - 如何从应用程序保存用户设置?

objective-c - 无法在 Swift 中使用 NSCoder 解码 Int

iphone - (viewConroller.view removeFromSuperview) 线程 :1 EXC_BAD_ACCESS (Code=1, 地址 = 0x6000000008)