命令行工具将资源添加到一个X code项目 [英] Command line tool to add resources to an Xcode project

查看:118
本文介绍了命令行工具将资源添加到一个X code项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经得到了创建可以以多种方式进行品牌和包含一些自定义内容标准应用的X code项目。目前,我有一个资源资源>旅游套餐根据本自定义文件。目前,每次我想品牌的应用程序不同的方式,我不得不删除此资源的旧文件,然后手动通过X code UI添加新的版本。我不能发布和形象,但它是在这里 - http://img.skitch.com/20100121 -xub48r6e1p857c84hdrgg25dw6.jpg )。

I've got an Xcode project that creates a standard application that can be branded in multiple ways and contain some custom content. At the moment I have a Resource "Resources > Tour Packages" with the custom files under this. At the moment every time I want to brand the app a different way I have to delete the old files from this resource and then manually add the new versions via the XCode UI. I can't post and image but it is here - http://img.skitch.com/20100121-xub48r6e1p857c84hdrgg25dw6.jpg).

我的问题:是否有执行相同操作的命令行工具

My Question: Is there a command line tool that performs the same operation?

推荐答案

您很可能会更好只是创造在你的X code项目的多个目标,以及资源的应用程序与一个品牌的每一个关联版本目标。

You'd probably be better off just creating multiple targets in your Xcode project, and associating the resources for each branded version of the app with one target.

要做到这一点,只是在你的目标点击右键并选择复制即可。然后,你应该从复制包资源删除自定义资源建设阶段。然后,您可以添加新的资源集合到复制包资源建立阶段所特有的新的目标。然后,您可以通过从活动目标选择它打造的任何目标你喜欢在X code栏或通过在项目选择它弹出>设置活动目标菜单

To do this, just right-click on your target and select Duplicate. You should then remove the custom resources from the Copy bundle resources build phase. You can then add a new set of resources to the Copy bundle resources build phase that are specific to the new target. You can then build any target you like by selecting it from the Active Target popup in the Xcode toolbar or by selecting it in the Project > Set Active Target menu.

这样,您就可以轻松构建不同版本的应用程序,而无需所有源,差X code项目等的完整副本。

This way, you can easily build different versions of your app without having complete duplicates of all your source, difference Xcode projects etc.

这篇关于命令行工具将资源添加到一个X code项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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