如何在 XCode4 中复制项目目标 [英] How to duplicate a project target in XCode4

查看:61
本文介绍了如何在 XCode4 中复制项目目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想为测试环境创建一个具有不同捆绑 ID 的目标.我尝试使用复制"功能来克隆一个目标并更改包 ID,发现原来的也被更改了.感谢您提供任何提示!

I want to create a target with different bundle id for test environment. I tried using the "Duplicate" function to clone a target and change the bundle id and found that the orignal one was changed too. Thanks for any tips!


================== 更新 ======================
解决复制目标后的链接错误,这是一个xcode错误.搜索路径中的引号更改为\"(目标的构建设置).


================== Update =====================
Solve the link error after duplicates the target, it is a xcode bug. The quote character " is changed to \" in search paths(Building setting of the target).

查看详情:http://flakasoft.com/developer-tips/xcode-4-bug-duplicating-a-target-results-in-link-error-due-to-missing-paths/

推荐答案

当您修改信息"选项卡上的 捆绑标识符 设置时,请仔细检查您是否选择了新的重复目标.我刚试过这个,效果很好.

Double check you have the new duplicate target selected when you modify the Bundle Identifier setting on the Info Tab. I just tried this and it worked fine.

所以包标识符在信息选项卡上,它实际上只是与目标关联的 info.pList 的视图.

So the bundle identifier is on the info tab, which is actually just a view of the info.pList associated with the target.

要更改该目标上的 info.pList,您需要复制 pList 文件 (newtarget-info.pList),进入目标的 Build Settings 选项卡,滚动向下到 Packaging 段并修改 Info.pList File 设置以指向您的新文件.

To change the info.pList on that target, you will need to make a copy of the pList file (newtarget-info.pList), go into the Build Settings tab for the target, scroll down to the Packaging segment and modify the Info.pList File setting to point to your new file.

然后当您单击信息选项卡时,您将从 newtarget-info.pList 文件中获取设置.

Then when you click on the info tab you will get the settings from your newtarget-info.pList file.

这篇关于如何在 XCode4 中复制项目目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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