Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
431 views
in Technique[技术] by (71.8m points)

xcode4 - Renaming targets in Xcode 4

In Xcode 4 I changed the name of my cocoa Application's Target Name because I wanted to change the name of the executable. The Build works fine but after compiling Xcode still starts the old executable that is still listed in the Products folder in the project navigator.

How can I change which application Xcode 4 starts up after build?

question from:https://stackoverflow.com/questions/5362299/renaming-targets-in-xcode-4

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To change the name of the application, you can select the new target, click the Build Settings tab, look for the Packaging section and change the Product Name. You'll notice the entry in the Products group in the navigator changes.

Since Xcode automatically creates matching schemes for each target by default, you'll also need to make sure the scheme for your new target is set to build and launch the new target's matching executable. To do this, select the scheme from the popup then choose edit scheme from the same popup. Select the Run action in the scheme editor sheet and make sure the Executable popup is set to your new target's newly-renamed executable. Do the same for the Profile action so it does the right thing when using Instruments and all. It should be properly selected already, but sometimes Xcode gets confused when renaming/moving things around.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...