• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
"Run" runs the app in the wrong target
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Run" runs the app in the wrong target


  • Subject: "Run" runs the app in the wrong target
  • From: Andy Lee <email@hidden>
  • Date: Wed, 27 Aug 2008 12:35:38 -0400

I wanted Xcode to build two versions of the same app -- let's call them AppOne and AppTwo -- that differ only by an #ifdef in a few places in my code. So I duplicated the target for AppOne and tweaked some settings in the duplicate target, which I renamed AppTwo. (I also created an aggregate target that has AppOne and AppTwo as dependencies, but I don't think that's relevant to my question.)

If I select AppTwo as the active target and say Build, it gets built as I would expect, with the name AppTwo.app. But when I say Run, Xcode launches AppOne (or if AppOne hasn't been built, the Run command is not available).

My question is: how do I tell Xcode to run AppTwo and not AppOne when the AppTwo target is active?

Here are the settings I changed (and I did this for "All Configurations"):

* Info.plist file. I pointed this to Info-AppTwo.plist, which is identical to the original Info.plist except for CFBundleName. I also commented out the CFBundleName in InfoPlist.strings so it wouldn't override the value in Info.plist.

* Product name. I changed this to AppTwo. A few other settings changed automatically when I did this, replacing "AppOne" with "AppTwo".

* Preprocessor macros.  I defined the macro used by my #ifdef.

--Andy

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: "Run" runs the app in the wrong target
      • From: Ken Thomases <email@hidden>
  • Prev by Date: Re: Interface Builder misbehaving while designing toolbars
  • Next by Date: Re: "Run" runs the app in the wrong target
  • Previous by thread: Re: Completely remove Xcode (and friends) settings
  • Next by thread: Re: "Run" runs the app in the wrong target
  • Index(es):
    • Date
    • Thread