ios dyld:库未加载:@rpath/Alamofire.framework/Versions/A/Alamofire 原因:找不到图像
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/29485035/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire Reason: image not found
提问by Ivan
I'm using CocoaPods v0.36
with my Swift
project and the following pods: Alamofire
, CocoaLumberHyman
, SwiftyJSON
.
我正在使用CocoaPods v0.36
我的Swift
项目和以下豆荚:Alamofire
, CocoaLumberHyman
, SwiftyJSON
.
Everything was fine till I used my Developer ID.
Compiler started to have problems to compile the project, after some fixes and updates for CocoaPods
my project compiles but at runtime I get the following error:
一切都很好,直到我使用了我的开发人员 ID。编译器开始在编译项目时遇到问题,在对CocoaPods
我的项目进行了一些修复和更新后,编译但在运行时出现以下错误:
dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire
Referenced from: /Users/Ivan/Library/Developer/Xcode/DerivedData/myApp-bsxfcnwqpaxnzbhencwzteasshzf/Build/Products/Debug/myApp.app/Contents/MacOS/myApp
Reason: image not found
I read different posts related to this:
我阅读了与此相关的不同帖子:
- http://blog.cocoapods.org/CocoaPods-0.36/
- http://samdmarshall.com/blog/swift_and_objc.html
- https://github.com/Alamofire/Alamofire/issues/101
- http://blog.cocoapods.org/CocoaPods-0.36/
- http://samdmarshall.com/blog/swift_and_objc.html
- https://github.com/Alamofire/Alamofire/issues/101
But none seems to solve the issue.
但似乎没有一个能解决问题。
The only clue that I have is that the 3 frameworks are in red, so it seems that are not generated/linked.
我唯一的线索是这 3 个框架是红色的,所以似乎没有生成/链接。
Now, I've removed my Developer ID, but the issue is still there. Does anybody have an idea?
现在,我已经删除了我的开发者 ID,但问题仍然存在。有人有想法吗?
采纳答案by Ivan
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
- pod 分解、pod 更新、pod 安装
- 重新导入了三个 swift 库文件(由 cocoapods 生成)
- 仅在 Linked Frameworks 和 Libraries 中导入了三个框架
- 完全清洁和构建
回答by NSurajit
dyld library not loaded @rpath/framework
dyld 库未加载@rpath/framework
please make sure that the framework is showing under target->general->embeded binaries and linked framework and libraries section
请确保框架显示在 target->general->embeded binaries and links framework and libraries 部分
if not then add by clicking + sign add just add the framework only
如果没有,则通过单击 + 符号添加添加仅添加框架
done!
完毕!
回答by Rishabh Shukla
For iOS 13.3.1 : comment use_frameworks in podfile .
对于 iOS 13.3.1:在 podfile 中注释 use_frameworks。
回答by bolnad
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.
我们做了一些比较,发现在 Xcode 项目的目标中会产生错误,因为Build Phases
它缺少一些 Cocoapods 应该生成的运行脚本。
Check your project to make sure that these 3 scripts are there
检查您的项目以确保这 3 个脚本存在
Check Pods Manifest.lock Embed Pods Frameworks Copy Pods Resources
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
如果不是,我附上了它们的屏幕截图,以便您可以手动添加它们
回答by Vladyslav Panchenko
Try this:
尝试这个:
Find your Target
--> Build Phases
--> Add New Copy Files Phase
-->Choose Destination Option
,Frameworks
--> Click add
AFNetworking.framework --> ?.
找到您的Target
--> Build Phases
--> Add New Copy Files Phase
--> Choose Destination Option
, Frameworks
--> 单击add
AFNetworking.framework --> ?。
回答by Dhaval H. Nena
Make sure you have set valid certificateand provisioning profile in XCode!
确保您在 XCode 中设置了有效的证书和配置文件!
回答by ssp009
After wasting two days and applying every solutions this worked for me. Hope it helps to you too.
在浪费了两天并应用了对我有用的所有解决方案之后。希望对你也有帮助。
Go to Keychain Access -> Certificates -> Double click on Apple Worldwide Developer Relations Certification Authority -> Click on the dropdown of trust -> When using this certificate -> set to Use System defaults
转到钥匙串访问 -> 证书 -> 双击 Apple Worldwide Developer Relations 证书颁发机构 -> 单击信任下拉列表 -> 使用此证书时 -> 设置为使用系统默认值
回答by COVID19
I have tried all the above solutions but no luck.
For me, Just run your app using an enrolled accountinstead of a free apple account.
我已经尝试了上述所有解决方案,但没有运气。
对我来说,只需使用注册帐户而不是 免费的苹果帐户运行您的应用程序。
Note:Free account is not worked in 13.3
注意:免费帐户在 13.3 中不起作用
回答by Behnam Rakhshani
in iOS 13.3.1 you can't run your application in your apple device without paid developer account
在 iOS 13.3.1 中,如果没有付费开发者帐户,您将无法在 Apple 设备上运行您的应用程序
you can read complete explanation in this link
您可以在此链接中阅读完整的说明