xcode 未找到框架头文件(iOS pop 框架)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24151994/
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-09-15 05:03:13  来源:igfitidea点击:

Framework header file not found (iOS pop framework)

iosobjective-cxcodefacebook-pop

提问by tj77

I'd like to install facebook's pop framework. I have a multi-project workspace which is not using cocoa pods. I want just the simplest, dumbest, quickest install.

我想安装 facebook 的 pop 框架。我有一个不使用可可豆荚的多项目工作区。我只想要最简单、最笨、最快的安装。

From the pop readme:

来自流行自述文件:

"... you can add the project to your workspace and adopt the provided configuration files or manually copy the files under the pop subdirectory into your project. If installing manually, ensure the C++ standard library is also linked by including -lc++ to your project linker flags."

"...您可以将项目添加到您的工作区并采用提供的配置文件或手动将 pop 子目录下的文件复制到您的项目中。如果手动安装,请确保 C++ 标准库也通过包含 -lc++ 链接到您的项目链接器标志。”

  1. I added pop.xcodeproj to my workspace.
  2. I added "pop.framework" to to the project that needs pop (general > linked frameworks and libraries).
  3. I added "-lc++" to my project linked flags (in the project that needs pop).
  4. Added #import <POP/POP.h>to my .m file.
  1. 我将 pop.xcodeproj 添加到我的工作区。
  2. 我将“pop.framework”添加到需要 pop 的项目(通用 > 链接框架和库)。
  3. 我在我的项目链接标志中添加了“-lc++”(在需要 pop 的项目中)。
  4. 添加#import <POP/POP.h>到我的 .m 文件中。

The result: "POP/POP.h" not found.

结果:未找到“POP/POP.h”。

I guess I'm doing something wrong, but absolutely no idea where to start looking.

我想我做错了什么,但绝对不知道从哪里开始寻找。

回答by leavez

I set the Built Setting of my project, then it worked.

我设置了我的项目的内置设置,然后它起作用了。

User Header Search Paths = $(SRCROOT)       // recursive. Pop is placed in the directory
Always Search User Paths = YES

回答by Alex Stone

This setting worked for me:

这个设置对我有用:

in podfile: pod 'pop'

在 podfile 中:pod 'pop'

in project > target > build settings always search user paths YES

在项目 > 目标 > 构建设置中始终搜索用户路径是

add search path: enter image description here

添加搜索路径: 在此处输入图片说明

回答by Charlton Provatas

After trying all of these solutions, what worked for me was actually was lowering the Deployment Target from 9.3 to 8.0.

在尝试了所有这些解决方案后,对我有用的实际上是将部署目标从 9.3 降低到 8.0。

回答by raeldor

Be careful of the order of your framework search paths. I had another project which I was referencing modules from that had a different version of the framework library and because that project was higher in the framework search path ranking it was picking up the incorrect header files too.

请注意框架搜索路径的顺序。我有另一个项目,我正在从该项目中引用具有不同版本框架库的模块,并且由于该项目在框架搜索路径排名中较高,因此它也获取了不正确的头文件。

回答by kekkeme

Those who suffers from it. My problem was like this,

受苦的人。我的问题是这样的

I was having trouble with swift and xcode 8 build times. So i changed my scheme Edit Scheme -> Build -> Find Implicit Dependencies (Uncheck). I was not get trouble with simulator i was having trouble with device. So when i change it to check again it worked. And then made uncheck or vice versa.

我在 swift 和 xcode 8 构建时间方面遇到了麻烦。所以我改变了我的方案 Edit Scheme -> Build -> Find Implicit Dependencies(取消选中)。我没有遇到模拟器问题 我遇到了设备问题。因此,当我更改它以再次检查时,它起作用了。然后取消选中,反之亦然。

回答by Endama

Take a look at this:

看看这个:

How to add facebook open source code pop to project directly

如何将facebook开源代码pop直接添加到项目中

I also discovered that the -lc++ flag actually caused a linker error. I followed the instructions in that link and removed the flag and everything worked!

我还发现 -lc++ 标志实际上导致了链接器错误。我按照该链接中的说明删除了标志,一切正常!

回答by Marcos Reboucas

You could try this...worked for me as I'm also adding pop as static library, instead of using CocoaPods:

你可以试试这个……对我有用,因为我还添加了 pop 作为静态库,而不是使用 CocoaPods:

  1. Download source code from this tutorial, because we'll be adding the library files with quotes "POP/POP.h" instead of < POP/POP.h > and all files are already changed here, just copy/paste the "pop" folder from the example project to your project: http://tapity.com/tutorial-getting-started-with-pop/You can alternatively change all files you already have inserting quotes.

  2. In your project create a subdirectory called "pop" (File/New/Group) with another subdirectory inside called "WebCore". It's important that you create these subdirectories so they will appear as yellow "folders" (instead of blue folders) and Xcode will compile the files properly. You can check if POP files are being included in Build Phases / Compile Sources.

  3. Add the respective POP files inside these empty subdirectories respecting the same structure of the source project (i.e. File/Add Files to "project" inside each subdirectory).

  4. Now just #import "POP/POP.h"and start using pop animations. Doing this way there's no need to add pop.xcodeproj to your workspace.

  1. 从本教程下载源代码,因为我们将添加带有引号“POP/POP.h”而不是 <POP/POP.h> 的库文件,并且所有文件都已在此处更改,只需复制/粘贴“pop”从示例项目到您的项目的文件夹:http: //tapity.com/tutorial-getting-started-with-pop/您也可以更改您已经插入引号的所有文件。

  2. 在您的项目中,创建一个名为“pop”(文件/新建/组)的子目录,并在其中创建一个名为“WebCore”的子目录。创建这些子目录很重要,因此它们将显示为黄色“文件夹”(而不是蓝色文件夹),并且 Xcode 将正确编译文件。您可以检查 POP 文件是否包含在构建阶段/编译源中。

  3. 在这些空子目录中添加相应的 POP 文件,遵循源项目的相同结构(即在每个子目录中将文件/添加文件到“项目”)。

  4. 现在就#import "POP/POP.h"开始使用流行动画。这样做不需要将 pop.xcodeproj 添加到您的工作区。