dyld: Library not loaded: AVFoundation.framework Reason: image not found

早过忘川 提交于 2019-12-22 08:38:35

问题


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

回答1:


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: Missing AVFoundation.framework

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




回答2:


I'd the same problem, was able to solve it by setting the added frameworks as Optional instead of Required from here, Project-> Targets-> Build Phases-> Link Binary with Libraries, change the status of added (or which creating the problem) frameworks to Optional, and it will run successfully.!



来源:https://stackoverflow.com/questions/1462964/dyld-library-not-loaded-avfoundation-framework-reason-image-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!