构建时如何让 Xcode 始终复制文件(即使它们未被检测为修改)? [英] How to have Xcode always copy files (even if they have not been detected as modified) when building?

查看:26
本文介绍了构建时如何让 Xcode 始终复制文件(即使它们未被检测为修改)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个应用程序,它使用存储在我的应用程序包的 Resources/javascript 文件夹中的 .js 文件.在我的 Xcode 2.5 项目中,我为我的 javascript 文件夹创建了一个文件夹引用(不是组),它会自动将该文件夹添加到复制捆绑资源构建阶段.

我遇到的问题是,当我修改 .js 文件时,我需要清理我的项目,然后重新构建它,以便在构建时将修改后的 .js 文件复制到我的应用程序包中.这非常耗时,因为我重新构建整个项目只是为了在我的应用程序包中获取更新的 .js 文件.

有人能告诉我如何让 Xcode 在构建阶段始终复制特定文件吗?

提前致谢!

解决方案

您可以右键或控制单击文件(在项目文件列表中)并在构建(手动)或添加脚本构建阶段之前单击触摸"到调用touch myfile.js"的目标并将其放置在您的复制文件构建阶段之前(自动).

I am developing an application which uses .js files stored in the Resources/javascript folder of my application bundle. In my Xcode 2.5 project I have created a folder reference (not a group) to my javascript folder, which automatically added the folder to the Copy Bundle Resources build phase.

The problem I have is when I modify my .js files, I need to clean my project then re-build it for the modified .js files to get copied into my application bundle when building. This is very time consuming since I re-build the whole project just to get an updated .js file in my app bundle.

Could someone tell me how to get Xcode to always copy specific files in the build phase?

Thanks in advance!

解决方案

You could right- or control-click the file (in the project file list) and click "Touch" before building (manual) or add a script build phase to the target that calls "touch myfile.js" and place it before your Copy Files build phase (automatic).

这篇关于构建时如何让 Xcode 始终复制文件(即使它们未被检测为修改)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆