在Xcode 5中添加框架到项目并添加了* relative *路径 [英] Adding frameworks to project in Xcode 5 and having *relative* paths added

查看:119
本文介绍了在Xcode 5中添加框架到项目并添加了* relative *路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

今天突然间我遇到了Xcode(5)的意外问题。

All of a sudden today I get an unexpected problem with Xcode (5).

这就是我通常添加外部框架的方式:

This is how I normally add an external framework:

将文件(xxx.framework等)(或包含该文件的文件夹)拖放到项目管理器中。
在选择添加文件的选项中我选中仅在需要时将项目复制到目的地(如果需要)(如果文件已经在项目的文件夹中,我不这样做)
在文件夹我选择为任何添加的文件夹创建组
然后我将其添加到我的应用目标。

Drag-n-drop the file (xxx.framework etc) (or the folder which contains the file) into the project manager. In "Choose options for adding files" I check "Copy items into destination (if needed)" only if needed (if the files are already in the project's folder I don't do this) In "Folders" I select Create groups for any added folders And I add it to my app target.

通常这也会添加亲戚构建设置/框架搜索路径和库搜索路径中框架的路径。

Normally this would also add the relative path(s) to the framework in Build Settings/Framework Search Paths and Library Search Paths.

但是今天显示的路径是 direct (又名绝对)。这会破坏线路,因为路径应该是相对的。为什么Xcode会突然这样做?我怀疑它可能只与这个项目有关(它来自第3部分开发),关于他们的项目设置可能会导致这种情况。

However today the path that shows up there is direct (aka absolute). This breaks stuff down the line because the paths should be relative. How come Xcode does this all of a sudden? I suspect it might have to do with this one project only (it comes from a 3rd part dev) and something about their project setup could be causing this.

推荐答案

我遇到了同样的问题。有一个简单的解决方案。转到框架搜索路径。从那里删除所有内容。添加./并使其递归。就是这样。

I faced the same issue. There is a simple fix. Go to framework search paths. Remove everything from there. Add ./ and make it recursive. That's it.

这篇关于在Xcode 5中添加框架到项目并添加了* relative *路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆