Xcode 4.1 — how to clone an app to make n distinct copies
I have an Xcode project that builds a tiny experimental C ocoa application, call it "foo.app", just as I want it. For evaluation purposes, I'd like to create 10 completely distinct copies, foo1.app, foo2.app, foo3.app ... foo10.app.
If I make two copies of foo.app, naming them fie.app and fum.app, when I run them, MacOS 10.7.x seems to identify them as identical. I'm fairly sure there's something besides the file name of an app that the OS uses for identification. (In fact, I'll be changing the file names to something completely different.) I think identification internally has to do with one or more of the user entries in Xcode's new project wi开发者_StackOverflow社区zard. "Product Name" or a derivative thereof?
What I'm looking for is how to edit the right value in an existing project, to avoid going throughthe new project wizard 10 times and creating 10 different projects, if that's possible.
TIA
You need to change the bundle name and identifier in the project info.plist file. Specifically, the following entries:
<key>CFBundleDisplayName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>xxx.yyy.${PRODUCT_NAME:rfc1034identifier}</string>
精彩评论