views:

1013

answers:

4

I'm trying to create an ad-hoc build of an iPhone app for beta testing.

On their end, they're seeing an error like the following:

"The info.plist for application at xxx specifies a CFBundleExecutable of (null), which does not exist"

Here is an excerpt from the actual info.plist:

<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>

And it clearly is not null.

What am I doing wrong here?

A: 

It sounds like you're looking at the info.plist in the project not the built product.

The '${EXECUTABLE_NAME}' in the project info.plist is just a place holder for a variable in the build script. You need to look at the info.plist in your built product to see what is listed there. It sounds like for some reason, the build script is not populating the field as it should.

You might actually check that the contents of the application package actually has an executable. Sounds weird I know but a few years ago I mucked about with my build setting son a project and ended up with a product without an executable. Everything else, the package, resources, string files etc was there just no actual program.

TechZen
You're right, I was looking at the wrong plist, however the one inside the built product seems to have the right value. Its value is "X" where the name of my application is "X.app", which sounds right to me
Kevin Laity
Does your executable name contain any strange characters by chance?
Epsilon Prime
+5  A: 

The WORKING SOLUTION is this (and only this):

In Xcode, choose “Executables” from the project hierarchy. Click your project executable then press Command-I. Choose the General tab and set the working directory to “Build Products directory”.

Found via BrainwashInc, who credits MacHackShack. I thought this valuable information was way too important to leave floating around on random blog.

It seems like sometimes XCode may flip this setting, as I suddenly started having this issue, and the fix above repaired it. Changing it back to "project directory" reproduces the issue for me, every time.

I also had to restart XCode to get the debugger to work once this fix installed the app, that may be unrelated.

Kendall Helmstetter Gelner
This happened to me, after trying to build a project when xcode did not have the file permissions to create the 'Build Products directory.' Apparently that is at least one of the ways this setting can get flipped.
Brad Smith
+1  A: 

I don't think there is ONE working solution to this. I found several solutions that doesn't work for me. At the end, I did find one solution.

By deleting whatever I had in the "Producs" folder in xCode I managed to get it working. I am using xCode 3.2.1.

Note: I did the change regarding "Build Products directory” above as well, perhaps both solutions needs to be implemented, up to you to try it out.

This is, to say the least, quite anoying. As a beginner, things are complicated enough without bugs in the SDK...

Hope this will help someone out there!

Cheers

Nicsoft
Agreed, there seem to be multiple things to try whenever this comes up.
Kevin Laity
A: 
Diego Freniche