Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode - error: unable to open executable.....how to fix?

Tags:

xcode

build

my first iPhone app is ready for submission using the Application Uploader. I think I understand that I have to create the file by going Product : Archive in Xcode, but when I do I get this message:

error: unable to open executable '/Users/Library/Developer/Xcode/DerivedData/test-euevazxsqeehnwantvxjhqwkytxr/ArchiveIntermediates/test/InstallationBuildProductsLocation/Applications/test.app/test'

The app builds and runs fine on my phone and on the simulator, so please can I have some advice on how to fix this? Thank you.

like image 976
StuartB Avatar asked Dec 01 '11 17:12

StuartB


4 Answers

You can also get this error if you've included .m file instead of the .h file somewhere in your code.

like image 197
RomanN Avatar answered Nov 19 '22 08:11

RomanN


Product>Clean and Product>Clean Build Folder (hold down option for it to appear). Quit Xcode and reopen and all should be well. If not, go into the Organizer, choose Projects, find Test and delete its DerivedData folder (IMPORTANT: NOT SNAPSHOTS).

like image 23
jrtc27 Avatar answered Nov 19 '22 09:11

jrtc27


this error is due to some class level things when u name class and generates it's properties' getter setter with @synthesize. it generates methods with get and set names included with properties. Probably you have some class containing such names. The exact way to find out is to click your issue navigator in navigator box. and then click the error. read the green area. you will find out what you have. and now remove that class or what ever it is. create it again with some different name now. prblm will be solved.

like image 2
Saad Avatar answered Nov 19 '22 09:11

Saad


In my case, this turned out to be caused by an invalid library (specifically an old version of libz). Once I deleted that from my frameworks folder, and added the correct libz library in the build phases section of the target settings, it built as normal.

like image 2
Ben Baron Avatar answered Nov 19 '22 08:11

Ben Baron