Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
343 views
in Technique[技术] by (71.8m points)

iphone - Missing AVFoundation.framework

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...