问题描述
AVFoundation.framework
不是文档说它应该是。我安装了iPhone SDK 2.2(安装了以前的sdk版本),我在 / System / Library / Frameworks
下找不到该文件夹
我在
下找到了 /Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2 .2.sdk / System / Library / Frameworks /
文件夹,但如果我从该位置添加,那么编译器找不到头文件。我试图将整个 AVFoundation.framework
文件夹复制到 / System / Library / Framework
,但它仍然找不到
如何使用 AVFoundation
b
感谢,
Alex
我在我的代码中使用了AVFoundation类,就像你做的一样。你不能浏览头部的一些未知的原因,但把它放在你的类头文件编译就好:
#import< AVFoundation / AVAudioPlayer.h>
我已经提交了我的应用程序并获得批准,因此我认为没有什么问题这种方法。 AVCoundation引用在XCode保持红色,但它似乎工作正常。删除框架引用会导致编译错误,因此它肯定需要在那里。
AVFoundation.framework
is not where the documentation says it should be. I have iPhone SDK 2.2 installed (never had previous sdk versions installed) and I can't find that folder under /System/Library/Frameworks
I did find it under
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.sdk/System/Library/Frameworks/
folder but if I add it from that location, then the compiler can't find the header files. I tried copying the entire AVFoundation.framework
folder to /System/Library/Framework
, but it still can't find the header files.
How can I use AVFoundation
classes?
Thanks,Alex
I've used the AVFoundation classes in my code, and added it the same way you did. You cannot browse the headers for some unknown reason, but putting this in your classes header file compiles just fine:
#import <AVFoundation/AVAudioPlayer.h>
I've submitted my app and had it approved, so I don't think there's anything wrong with this approach. The AVFoundation reference remains red in XCode, but it seems to work fine. Deleting the framework reference causes compile errors, so it definitely needs to be there.
这篇关于缺少AVFoundation.framework的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!