Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Renaming Duplicated Target: Where do I fix the reference to the default plist name?

Environment: Xcode 4.6.3

I wish to duplicate a target and rename it from the default ' copy' to ' (Simulator)'.

Steps that I've done:
1) Select the target & contextually click the 'duplicate' option.
2) Click/Select the copied target name and modify it to chose name: ' (Simulator)'.
3) Manage Schemes: delete the generated (copy) and auto-generate new scheme.
...the newly-generated scheme should be correctly labeled with '...(Simulator)'.

Problems...
Either I get a compiler error of a conflicting piece of code, or I get the following:

Error: could not read data from '/Users/ric/Desktop/iPhone5_support/CG-Mobile copy-Info.plist': The file “CG-Mobile copy-Info.plist” couldn’t be opened because there is no such file.

Question: What's the simplest way to
a) duplicate and
b) rename this duplicate so that I don't screw-up the build?

like image 384
Frederick C. Lee Avatar asked Nov 15 '25 02:11

Frederick C. Lee


1 Answers

In these situations I often just manually fix things in the project.pbxproj with a text editor.

  1. Close Xcode
  2. Open project.pbxproj in a text editor (Emacs, Vim, SublimeText, etc)
  3. Search/replace CG-Mobile copy-Info.plist with your new name.
  4. Save.
  5. Reopen xcode.
like image 144
Brian Richardson Avatar answered Nov 17 '25 20:11

Brian Richardson



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!