views:

1632

answers:

1

How do I fix this?

dyld: Library not loaded: /System/Library/Frameworks/AVFoundation.framework/Versions/A/AVFoundation   Referenced from: /Users/[...]/Library/Application Support/iPhone Simulator/User/Applications/[...]/TestGame.app/TestGame   Reason: image not found
+2  A: 

You need to add this Framework to Xcode.

Right-click on "Frameworks" > Choose Add > Existing Frameworks Locate "AVFoundation" then choose Add.

If you want to add it manually, choose the other button and navigate to:

/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS2.2.1.sdk/System/Library/Frameworks/AVFoundation.framework/

Replace the iPhone SDK version with whatever you are building against.

Perhaps also see this answer: http://stackoverflow.com/questions/385530/missing-avfoundation-framework

Also, sometimes you just need to close Xcode, then clean and rebuild.

Brock Woolf
I'd recommend restarting XCode. This problem occurs very often when you switch between Active Configuration (e.g. Debug, Release).
Colins