“找不到图像";使用自定义框架时出错 [英] "image not found" Error while using Custom FrameWork
本文介绍了“找不到图像";使用自定义框架时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我为我的一个可可粉应用程序创建了自己的框架.我将该框架添加到我的项目中,并从该框架中调用了一个方法.当我尝试运行我的应用程序时,它崩溃了:
I created my own framework for one of my cocoa application. I added that framework to my project and called a method from that framework. When I tried to run my application it crashed:
崩溃日志:
dyld: Library not loaded: @rpath/MMP.framework/Versions/A/MMP
Referenced from: /Users/Midhun/Library/Developer/Xcode/DerivedData/MMPTest-ccvjtgedqkcftchapjehhwjbaqdq/Build/Products/Debug/MMPTest.app/Contents/MacOS/MMPTest
Reason: image not found
我做了什么:
框架:
- 我在公共部分添加了头文件
- I added my header file in public section
- 我添加了Deployment和
Linking
的路径,例如: - I added the paths of Deployment and
Linking
like: - 我构建了项目,并准备好了框架(到这里为止非常酷).
- 我将该框架添加到了项目根目录下的
FrameWorks
文件夹中. - 我在
Link Binary With Libraries
部分 下添加了框架
- 我更改了链接的路径,例如:
- I added that framework to
FrameWorks
folder under my Project's root directory. - I added the framework under
Link Binary With Libraries
Section - I changed the path of Linking like:
What I have done:
FrameWork:
平台详细信息:
Xcode: 4.6.2
OS X : 10.8
我尝试过的操作(崩溃后)
- 出现此问题时,我与
otool
进行了核对.它显示如下路径:
- When I get this issue, I checked with
otool
. It shows the paths like:
查看全文