English 中文(简体)
在带有XCode 4的.app捆绑包中嵌入自定义框架时出现问题
原标题:Problem embedding a custom framework inside an .app bundle with XCode 4

在问这个问题之前,我已经在网上搜索了一段时间。但我完全被卡住了,我不知道该怎么解决。

我必须使用XCode 4在.app捆绑包中嵌入一个自定义框架。我知道我必须使用install_name_tool实用程序来修复框架的安装路径。我是这样做的:

install_name_tool -change /Library/Frameworks/Ogg.framework/Versions/A/Ogg @executable_path/../Frameworks/Ogg.framework/Versions/A/Ogg <input framework>

我已经通过查看文件的“上次修改”时间戳来验证该框架实际上是经过处理的。

现在问题:框架被复制到应用程序捆绑包中,但当我运行应用程序时,它崩溃了,在错误报告中,它“告诉”找不到/Library/Frameworks/Ogg.framework/Versions/A/Ogg图像。请记错名字。

我确信我嵌入了正确版本的框架(由install_name_tool修改的版本)。

我能做什么?提前谢谢。

EDIT:我甚至尝试从源代码重新编译库,指定了不同的安装路径,但问题仍然存在。我在应用程序的可执行文件上尝试了otool-L,它列出了路径错误的Ogg框架(/Library/Frameworks/…)。我不知道它在哪里。请帮助。。。

最佳回答

您希望在应用程序的二进制文件上运行install_name_tool

或者,您可以将框架的安装名称更改为@executable_path//<;等等>,然后将应用程序链接到它。

问题回答

暂无回答




相关问题
How to change out-of-focus text selection color in Xcode?

Okay, I ll bite. I ve got really pleasant code/window colors set up in Xcode. Ordinarily, my selection color is very visible. When I am doing a project search and iterating through the results, ...

Iphone NSTimer Issue

Hi I am new to objective c. I am trying to make an app for iphone. I have a button on my view, and the click on which the function playSound is called. This is working properly. It does plays the ...

Include a .txt file in a .h in C++?

I have a number of places where I need to re-use some template code. Many classes need these items In a .h could I do something like: #include <xxx.txt> and place all of this code in the ....

Iterating over string/strlen with umlauted characters

This is a follow-up to my previous question . I succeeded in implementing the algorithm for checking umlauted characters. The next problem comes from iterating over all characters in a string. I do ...

Xcode open two editor windows with same file

Is it possible to open the same file in two separate windows in Xcode. I can open a file in one window and the same file in the main Xcode editor window, but I wanted two separate fulltime editor ...

Forcing code signing refresh in Xcode

In our environment, we share resources across multiple projects and platforms. When building for iPhone, only a subset of those resources are needed. Since that subset is still considerable, we have ...