如何在 Xcode 中获取头文件到框架中?

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

How to get headers into framework in Xcode?

objective-cxcodemacosframeworks

提问by john146

I'm trying to build a framework for MacOS in Xcode 3. It looks like it's building everything except the Headers directory according to the layout listed in the Apple documentation. I can't find anything that tells me what settings to use to get the build process to copy the headers into Headers directory in the framework, or alternately where I have to put those files.

我正在尝试在 Xcode 3 中为 MacOS 构建一个框架。看起来它正在根据 Apple 文档中列出的布局构建除 Headers 目录之外的所有内容。我找不到任何告诉我使用什么设置来获取构建过程以将标题复制到框架中的 Headers 目录中的任何设置,或者我必须将这些文件放在何处。

Any help?

有什么帮助吗?

Thanks.

谢谢。

回答by Barry Wark

The headers need to be made "public" instead of the default "project" in the framework target (select the framework target in the Files & Groups pane to list the framework files).

标题需要在框架目标中设为“公共”而不是默认的“项目”(在“文件和组”窗格中选择框架目标以列出框架文件)。

回答by cdespinosa

You want to add the path to the framework to the framework search path, not the header search path.

您想将框架的路径添加到框架搜索路径,而不是标题搜索路径。