"No launchable executable present at path" error - Xcode
I knew I'd seen that somewhere before, but couldn't remember why,
what fixed it, or even what project it was in. But just now I made it
happen again, by accident, and by mucking around, made it happen yet
again.
I have one target only but four build configurations ...
The first three build configurations have the same application
name -
asd.app
The fourth build configuration - "lite distribution" - has another
app
name - asdlite.app
My project seems similar: one target; three build configurations. One
config is for Ad Hoc distribution to testers, who like to see a
version number appended to the app name. Incrementing it could be
automated (this was even discussed again on the list a few days ago)
but I've just been lazily editing the Ad Hoc config's "Product Name"
along with Bundle version Info.plist when a new test version goes
out.
Info.plist contains ${PRODUCT_NAME} and ${EXECUTABLE_NAME}, the
single edit goes into the right places, and well, that's automagic
enough for me, for the moment.
Xcode seems to get confused, though, if you do this:
Active SDK: Device (it's on 3.0 now, but I know it was on 2.x when
this last happened weeks ago)
Clean & Build Ad Hoc config
Edit "Product Name", same config
Build & Go - launches on device
Switch to Debug config
Build & Go - get error "No launchable executable present at path"
Clean
Build & Go - get error "No launchable executable present at path"
Build Results reads:
Building target "AppName" of project "AppName" with configuration
"Debug"
Checking Dependencies
<ends>
Switch back to Ad Hoc config
Clean
Build
Switch to Debug config
Build & Go - launches OK on device
This is a minor problem since it only appears when first opening
the project
but to me it looks as a bug, or?
Seems so. After the first accident, I tried it again several times.
Couldn't always happen make it happen, but did get it to recur.
Also noticed (once), in the status bar in Xcode window, something
funny:
With:
Ad Hoc config Product Name: < AppName >nnn
Debug config Product name: < AppName >
Edit Ad Hoc Product Name to < AppName >nnn+1
Switch to Debug config (whose Product Name is < AppName >)
Build & Go -
-- Xcode status in lower left reads "starting debugserver with <
AppName >nnn+1 on iPhoneFoo"
-- (note that's the wrong app name
-- After a long pause (10-15 seconds) the status display switched to
-- "starting debugserver with < AppName > on iPhoneFoo" (correct
Product Name for Debug config)
-- and stayed there. The app didn't launch on the device, but neither
was Xcode frozen.
Finally clicked Stop button, status bar changed to "Debugging
terminated"
Maybe I'm (mis)using Product Name and should do something
differently, but there does seem to be some oddness or other if
Product Name differs in different configs...