dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire Reason: image not found

家住魔仙堡 提交于 2019-11-30 03:01:54

dyld library not loaded @rpath/framework

please make sure that the framework is showing under target->general->embeded binaries and linked framework and libraries section

if not then add by clicking + sign add just add the framework only

done!

Solved Below the steps I did:

  • pod deintegrate, pod update, pod install
  • Reimported the three swift library files (generated by cocoapods)
  • Imported the three frameworks only in the Linked Frameworks and Libraries
  • Full clean and a build

we were running into this issue here at work and one person's project would run while the other would get this strange error.

We did some comparison and realized that error is being generated when in the Xcode project's target, under Build Phases its missing some of the run scripts that Cocoapods is supposed to generate.

Check your project to make sure that these 3 scripts are there

Check Pods Manifest.lock
 Embed Pods Frameworks
 Copy Pods Resources

If they aren't I've attached a screenshot of them so that you can add them manually

Try this:

Find your Target --> Build Phases --> Add New Copy Files Phase -->Choose Destination Option,Frameworks --> Click add AFNetworking.framework --> ✓.

Make sure you have set valid certificate and provisioning profile in XCode!

I solved that trouble just by uncheck the "copy only when installing" on copy frameworks in Build Phases

Solved by Unchecking Copy Only when installing.

None of the other stuff worked for me. So what did solve it for me in the end was a change in the podfile. I changed the code for the target in which it happened to:

target 'UITests' do
inherit! :search_paths
end

After a pod install it finally worked.

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