简体   繁体   English

带有空格问题的Xcode项目/应用程序名称 - 找不到框架

[英]Xcode project/app name with spaces issue - framework not found

Is it possible that Xcode 6.1 doesn't finds my previously imported frameworks because of my 3 word app name? 由于我的3个字应用程序名称,Xcode 6.1是否有可能找不到我以前导入的框架? I'm using Parse and never ever had any problems with it. 我正在使用Parse,从来没有遇到任何问题。 But actually when I open my project in Xcode I got an error that the framework doesn't found, which is absurd because it worked well earlier and I don't removed it. 但实际上当我在Xcode中打开我的项目时,我得到了一个框架没有找到的错误,这是荒谬的,因为它之前工作得很好而且我没有删除它。 However if I delete the frameworks and add them again everything is fine. 但是,如果我删除框架并再次添加它们一切都很好。 Am I doing something wrong or is it an Xcode bug? 我做错了什么或是Xcode错误?

ld: warning: directory not found for option '-F/Users/donip/Documents/Fl Travel Guide/Fl'
ld: warning: directory not found for option '-FTravel'
ld: warning: directory not found for option '-FGuide'
ld: framework not found ParseFacebookUtils
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Simply enclose your framework path in double quotes(""). 只需将框架路径用双引号(“”)括起来即可。 For example: 例如:

"$(SRCROOT)/my framework/path" “$(SRCROOT)/我的框架/路径”

在此输入图像描述

"directory not found for option '-F/..." “找不到选项'-F / ...的目录”

Here '-F/..' shows it's a Framework Error. 这里'-F / ..'显示它是一个框架错误。 There could be 2 reasons for this. 这可能有两个原因。

  1. Missing escape "\\" character. 缺少转义“\\”字符。

    It seems search paths are broken up on several lines in the Framework Search Path or Library Search Paths. 似乎搜索路径在框架搜索路径或库搜索路径中的几行上被分解。 Or having spaces in path. 或者在路径中有空格。 Add the escape "\\" character to fix it. 添加转义“\\”字符以修复它。

  2. Click on your project (targets)-> Click on Build Settings-> Under Frameworks Search Paths, delete the paths. 单击您的项目(目标) - >单击构建设置 - >在框架搜索路径下,删除路径。

I'm sure this is Xcode bug. 我确定这是Xcode错误。 Since a lot of other developers have problems with frameworks paths, such as Absolute path issues I'm sure You will find other issues too in SO. 由于许多其他开发人员遇到框架路径问题,例如绝对路径问题,我相信你也会在SO中找到其他问题。

I have encountered this issues myself too. 我自己也遇到过这个问题。 Best solution for me just commit working project files, and then reset/revert new/wrong changes which done by Xcode. 对我来说最好的解决方案就是提交工作项目文件,然后重置/恢复由Xcode完成的新/错误更改。

For me, I had to delete (using Terminal): 对我来说,我不得不删除(使用终端):

/Users/xxxxxxx/Library/Developer/Xcode/DerivedData/PROJECT_NAME

Using: 使用:

rm -r PROJECT_NAME-xxxxxxxx

If you have multiple projects with the same name in the /DerivedData folder, first try deleting all but the most recent one. 如果/DerivedData文件夹中有多个具有相同名称的项目,请首先尝试删除除最新项目之外的所有项目。 If that does not work, try deleting all projects including the most recent. 如果这不起作用,请尝试删除包括最新项目在内的所有项目。

Just update your library location to such a path which doesn't have any spaces inbetween. 只需将您的库位置更新为这样的路径,其中间没有任何空格。 For example, instead of : 例如,而不是:

'-F/Users/donip/Documents/Fl Travel Guide/Fl'

use 采用

'-F/Users/donip/Documents/FlTravelGuide/Fl'

Just change the folder name, available in that path, then make the same change in project settings in Library Search Paths and Header Search Paths , wherever its been referred. 只需更改该路径中可用的文件夹名称,然后在Library Search PathsHeader Search Paths中的项目设置中进行相同的更改,无论它在何处被引用。

Hope this will resolve your query. 希望这将解决您的查询。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM