如何使用Xcode4项目模板将文件添加到“副本捆绑资源"构建阶段

编程入门 行业动态 更新时间:2024-10-28 02:26:17
本文介绍了如何使用Xcode4项目模板将文件添加到“副本捆绑资源"构建阶段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在处理Xcode 4项目模板,我正在努力控制要添加到复制捆绑资源"构建阶段的文件-添加了不想复制到项目捆绑中的头文件并且我确实要复制的文件没有出现在此列表中(一个既包含静态库又包含图像资源的自定义.framework文件).

I'm working on an Xcode 4 project template and I'm struggling with controlling the files that get added to the Copy Bundle Resources build phase--header files get added that I do not want to be copied into the project bundle and a file that I do want to be copied does not appear in this list (a custom .framework file that contains both the static library and image resources).

似乎Xcode从项目模板的节点"部分自动构建了该构建阶段的内容;如果是.framework,它将自动添加到链接库中;如果是.m,则它将自动添加到编译源中,其他所有内容都将添加到副本捆绑资源中.

It seems like Xcode automatically builds contents of this build phase from the Nodes section in the project template; if it's a .framework, it automatically gets added to the linked libraries, if it's a .m, it automatically gets added to compiled sources, and everything else gets added to the Copy Bundle Resources.

我将很高兴为此提供任何指导!

I'd be grateful for any direction on this one!

更新: 为了明确起见,我正在尝试创建一个Xcode项目模板,该模板在使用时会创建一个新的Xcode项目,该项目包括在复制捆绑资源"构建阶段中的模板中指定的文件.

Update: To clarify, I'm attempting to create an Xcode project template that, when used, creates a new Xcode project that includes the specified files from the template in the Copy Bundle Resources build phase.

推荐答案

这应该有所帮助.在类资源"键值对之后,您可以以某种方式添加文件.我无法弄清楚,但我确定您可以在某个地方找到它.

This should help. After the Class-Resources key-value pair, you can add files somehow. I couldn't figure that out but I'm sure you can find it somewhere.

实际上,我认为一种更简单的方法是在定义"部分中,在路径"键之后添加一个TargetIndices键(一个数组).经过一些试验,您应该能够找出要在该阵列的一项上放置什么值,以便将其放入复制捆绑资源"构建阶段.

Actually, i think an easier way is to in the Definition part, after the Path key, add a TargetIndices key (an array). With some experimenting you should be able to find out what value to put on one item of that array to put it in the Copy Bundle Resources build phase.

更多推荐

如何使用Xcode4项目模板将文件添加到“副本捆绑资源"构建阶段

本文发布于:2023-11-26 06:12:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1632950.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:副本   如何使用   模板   阶段   文件

发布评论

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

>www.elefans.com

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