xcode:共享2个目标的.pch文件(xcode: share .pch file for 2 targets)

编程入门 行业动态 更新时间:2024-10-23 16:25:40
xcode:共享2个目标的.pch文件(xcode: share .pch file for 2 targets)

我发布了我的iPhone应用程序的精简版,并且在商店里。 现在,我想添加“完整”版本的代码,并陷入困境。

在项目中添加第二个目标后,Lite版本编译正常,但完整版本没有。 这是因为_Prefic.pch文件中定义的宏对代码的完整版本不可见。

项目可以有多个.pch文件吗? 如果不是,如何指定XCode与两个目标共享.pch文件?

I published lite version of my iPhone-app and is in the store. Now, I want to add the code for the 'full' version and am stuck at a point.

After adding the second target in the project, the lite version compiles fine, but the full version does not. This is because the macro defined in _Prefic.pch file is not visible to the full version of the code.

Can a project have multiple .pch files? If no, how do I specify XCode to share the .pch file with both targets?

最满意答案

右键单击目标并选择“获取信息”。 在“构建”部分中搜索“前缀标题”设置并查看其值。 根据需要设置值(到新文件或已存在的文件)。

Right-click on your target and choose "Get Info". In the "Build" section search for "Prefix Header" setting and look at its value. Set the value as needed (to a new file or to already existing one).

更多推荐

本文发布于:2023-08-07 21:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465601.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:目标   文件   pch   xcode   file

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!