ios ld:未找到框架解析 Xcode 7 beta

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31295369/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-31 06:47:30  来源:igfitidea点击:

ld: framework not found Parse Xcode 7 beta

iosswiftparse-platformxcode7xcode7-beta2

提问by papay0

I succeed to install and use Parse framework with my new project, but I can't with a "template project".

我成功地在我的新项目中安装和使用 Parse 框架,但我不能使用“模板项目”。

The template is just a Slide Menufrom Appcoda

该模板只是来自Appcoda幻灯片菜单

You can download the project here. I have this error :

您可以在此处下载该项目。我有这个错误:

ld: framework not found Parse
clang: error: linker command failed with exit code 1 (use -v to see invocation)

And the same for Bolts.

螺栓也是如此。

I don't understand what the problem is, the initial project is just some View Controllers...

我不明白问题是什么,最初的项目只是一些视图控制器......

When I write the code "import Parse", the error message is :

当我编写代码“import Parse”时,错误信息是:

No such module 'Parse'

I tried to drag and drop the frameworks, and also to add the frameworks in "Link Binary With Libraries".

我尝试拖放框架,并在“Link Binary With Libraries”中添加框架。

PS : I am using Xcode 7 beta, and I tried on beta 1 and 2, same issue.

PS:我使用的是 Xcode 7 beta,我尝试了 beta 1 和 beta 2,同样的问题。

回答by papay0

Here is the solution:

这是解决方案:

There seems to be an issue with Xcode 7 beta where the search path for manually added frameworks is missing.

Xcode 7 beta 似乎存在一个问题,其中缺少手动添加的框架的搜索路径。

To fix the issue add the search path by doing the following:

要解决此问题,请执行以下操作添加搜索路径:

  1. Select Project
  2. Click on Targets
  3. Click Build Settings
  4. Search for: Framework Search Path
  5. Add $(PROJECT_DIR)and choose Recursiveoption.
  1. 选择项目
  2. 点击目标
  3. 单击构建设置
  4. 搜索: Framework Search Path
  5. 添加$(PROJECT_DIR)并选择递归选项。

The project should build now.

该项目应该立即构建。

Thanks to this post : Link to stack

感谢这篇文章:链接到堆栈

回答by keith.g

None of the proposed solutions worked for me. Eventually I found that the solution was to drag the frameworks from a source folder that did not have spaces in it's name.

没有提出的解决方案对我有用。最终我发现解决方案是从名称中没有空格的源文件夹中拖动框架。

E.g.

例如

  • Dragging the frameworks from 'iOS SDKS' > did not work
  • Dragging the frameworks from 'Downloads' > worked
  • 从“iOS SDKS”中拖动框架 > 不起作用
  • 从“下载”中拖动框架 > 工作

It's not the first time that XCode has been shown to be problematic when working with paths that contain spaces.

XCode 在处理包含空格的路径时出现问题,这已经不是第一次了。

回答by random

Ensure that Parse is included in the "Link Binary With Libraries" section under "Build Phases".

确保 Parse 包含在“Build Phases”下的“Link Binary With Libraries”部分中。

回答by villva smith

Go to your Build Phases -> Linked Binary With Libraries remove your pod framework & add it back again. That does the trick.

转到您的 Build Phases -> Linked Binary With Libraries 删除您的 pod 框架并重新添加它。这就是诀窍。