ios dyld: Library not loaded: @rpath/xxx.framework/xxx 之根本原因

碰到问题

dyld: Library not loaded: @rpath/xxx.framework/xxx

Referenced from: /var/containers/Bundle/Application/0F41980D-5091-449D-AE29-5D018E3EB554/DemoOC.app/DemoOC

Reason: image not found

enable Always Embed Swift Standard Libraries option under Build Options,之后依然出现

尝试网上的各种办法都无效,得从根本上解决问题,查看build settings -> linking ->runpath search path为

@executable_path/Frameworks

再看Products生成的app ,显示包内容 Frameworks文件夹下确实没有xxx.framework.

而且查看xcode升级之前的工程,app包的Frameworks中有xxx.framework.

难怪运行时找不到库,那么根本办法是如何让xxx.framework编译到这个文件夹下。

实验1:新建一个swift 工程引用xxx.framework。依然碰到同样的问题,包内容Frameworks中没有xxx.framework

发现xcode升级前的工程Build Phases有Embed Frameworks这一项,而升级后新建的工程都没有这个了。贼坑。。。。

Linked Binary With Libraries 与  Embedded Framework的区别:前者不会拷贝到 App 里的,Embedded Framework会拷贝到 App 里。

General 下找到了Embed Frameworks ,添加xxx.framewok之后,OK了!!

而且也不需要enable Always Embed Swift Standard Libraries

时间: 2024-10-17 16:35:50

ios dyld: Library not loaded: @rpath/xxx.framework/xxx 之根本原因的相关文章

iOS 报错信息: dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from

新建项目,引入framework,运行时出现警告:dyld: Library not loaded: @rpath/RLLibrary.framework/RLLibrary Referenced from: /var/mobile/Applications/AE92B234-A818-445E-9D69-96E232BD50EB/RLProjectDemo.app/RLProjectDemo Reason: image not found 看网上不少人说是将 上图Link Binary Wit

Xcode 7 中 CocoaPods 编译报错 dyld: Library not loaded: @rpath/Pods.framework/Pods

问题症状与解决 在 Xcode 7 beta 3 (7A152u) 中创建 Swift 项目,并使用 CocoaPods 做依赖管理,编译时会遇到如下的报错: dyld: Library not loaded: @rpath/Pods.framework/Pods Referenced from: /private/var/mobile/Containers/Bundle/Application/26B91138-7483-40B0-9BE6-D27072472895/AppName.app/A

dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /private/var/mobile/Conta

dyld: Library not loaded: @rpath/XCTest.framework/XCTest Referenced from: /private/var/mobile/Containers/Bundle/Application/3A8F980D-F647-4D6D-B95A-88EC600BCA6B/RR.app/RR Reason: image not found 解决办法:工程->targets->Bulid Phases->complie Sources->

dyld: Library not loaded: @rpath/MySDK.framework/MySDK 错误解决

dyld: Library not loaded: @rpath/MySDK.framework/MySDK   Referenced from: /var/mobile/Applications/08B6D2C2-5028-4A64-93F5-1252B0B0BCAB/MyApp.app/MyApp   Reason: no suitable image found.  Did find: /private/var/mobile/Applications/08B6D2C2-5028-4A64-

dyld: Library not loaded: @rpath/XCTest.framework/XCTest

最近用别人的传给的源代码,发现出现dyld: Library not loaded:问题. 控制台出现如此的输出:dyld: Library not loaded: @rpath/XCTest.framework/XCTest......   经过大量的资料查询,发现是Build Phases 里的Compile Sources 里包含有__Tests.m或者__UITests.m文件,   如需解决,只需将包含__Tests.m或者__UITests.m的编译文件删除就OK了.

iOS 报错 : dyld: Library not loaded: @rpath/

今天用阿里短视频点播短视频服务按照上边引导导入sdk后编译报错: dyld: Library not loaded: @rpath/ 整了半天 结果是目前iOS的短视频SDK输出的都是动态库,需要以动态库的方式添加. 需要在MyApp的工程中做如下配置

dyld: Library not loaded: @rpath/libswiftCore.dyli

今天代码写的很烦躁,写完了,编译成功后,居然,尼玛,直接崩了.控制台输出如下错误: /****************************************************************/ tao  14:37:17dyld: Library not loaded: @rpath/libswiftCore.dylib  Referenced from: /Users/codinghacker/Library/Developer/CoreSimulator/Device

Solve Error: Library not loaded: @rpath/RoutingHTTPServer.framework/RoutingHTTPServer

在配置WebDriverAgent的时候,可能会遇到如下的错误: 2018-01-04 09:53:42.759370-0600 WebDriverAgentRunner-Runner[318:13300] +[CATransaction synchronize] called within transaction 2018-01-04 09:53:43.090645-0600 WebDriverAgentRunner-Runner[318:13300] Running tests... 201

iOS dyld: Library not loaded crash问题

今天在引入第三方framework时,我按照以前的方法,把framework加入到了下图的地方: 默认是required的,之后程序就crash了,报错dyld: Library not loaded,之后我把required 改成了optional,这次不crash了,但是运行时出错,库中的对象无法实例化,全部是空. 我是根据http://stackoverflow.com/questions/24333981/ios-app-with-framework-crashed-on-device-