views:

748

answers:

3

Ok, so I'm working on an alternate version of an iPhone app, and my new version builds just fine. The executable is actually created, I checked the build directories.

I've tried manually changing EXECUTABLE_NAME to the correct name in my second target's info plist file, but that does not change the behavior. MyApp2.app is still created.

The problem is that when the debugger loads up, it loads up the wrong executable -- MyApp.app, instead of MyApp2.app.

Any suggestions?

A: 

Check your new app's target information (right click on target -> Get Info). Under the "Packaging" settings category (In the build tab) you want to change the "Product Name" value to MyApp2. Your info.plist file's value should remain unaltered, and it will grab the Product Name automatically.

fbrereto
A: 

I had some similar issues. You can try checking the .xcodeproj file in a text editor and replacing any references of the old name with the new one.

I assume you already changed the Product Name in the build settings.

If that doesn't work try restarting Xcode and re-changing the Product Name.

This happened to me where the old app name was "sticky" and it took me a few times to get it updated properly.

If this doesn't work, create a new target as opposed to duplicating the target, that should fix it.

Corey Floyd
A: 

The answer to my particular problem was to make triple-sure that I changed the product name for all configurations. For some reason, I had not done this for all of my configurations. I thought I had checked it, but no.

Matt