复制xcode4工程

http://ipaddevzone.com/cs/howto-duplicaterename-target-xcode4


Howto duplicate/rename target in XCode4

  1. select project in Navigator panel
  2. select Target you want to duplicate
  3. right mouse click and choose "Duplicate"
  4. Rename Target in XCode: click on selected Target and inline edit starts.
  5. Open Terminal and go to your project directory/folder
  6. Run svn status to see the changes XCode just has made.
  7. XCode has created new Infocopy.plist file and has added under version control if you use one. Typically you want to choose different name so follow these steps:
    • Cancel version control addition: $> svn revert Infocopy.plist
    • Rename it: $> mv Infocopy.plist YourNameInfo.plist
    • Add it to version control: $> svn add YourNameInfo.plist
    • Set the new name in your new Target Build Settings named "Info.plist File"
  8. Rename target file properly: $> mv OrigTargetCopy.xcscheme YourTargetName.xcscheme
  9. Add the new target file under version control: $> svn add YourTargetName.xcscheme
  10. Rename you Product in your new Target Build Settings named "Product Name"
  11. Very likely you will also want to set new "Preprocessor macros" Build Settings for your new Target.
  12. Set proper values your YourNameInfo.plist
  13. Set Target assignment for target specific files. Typically YourNameInfo.plist shall be part only of you new target. There may be plenty of other similar files (icon, splash screen, other graphics, etc).

Note: you can easily find new files locations by using $> svn status. At the very beginning, you shall see new Info.plist as new Added and the new target file as not yet versioned file.

Tip: use as many Project level Build settings as possible. Override only those really Target level specific.


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值