Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode falsely claims CFBundleExecutable to be (null)

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?

like image 690
Kevin Laity Avatar asked Dec 30 '22 11:12

Kevin Laity


1 Answers

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.

like image 93
Kendall Helmstetter Gelner Avatar answered Jan 08 '23 02:01

Kendall Helmstetter Gelner