Xcode 5.1.1 and OS X 10.9.3
I open Xcode and start a new Cocoa project. I then click run. The build fails, and I get the following error message:
Int
I got a similar error with a brand new project when I had a special character (&) in the Organization Name. The OP doesn't seem to have this situation, but maybe this will help others who find their way here. This seems to be a new bug with Xcode 6.
Aha! What a ridiculous solution! Hope this helps somebody.
Add a new xib file!
And delete the old MainMenu.xib
for good measure. The new xib will show up as expected.
But wait - there's more!
I'm not sure if it's just that my Xcode is horribly corrupted, but here's what else I had to do to get my application to run successfully:
1 - Go to your general project settings and set the Main Interface to your new xib file's name without the .xib
extension! Otherwise, you'll get output in your console that says Unable to load nib file
. See pics to compare. This will get your blank app window to pop up when you run the program.
2 - Now you need your app delegate to do stuff. Drag an Object
from the object library to the list of objects in the interface builder. Define its class as your app delegate class name and the object should rename itself to 'App Delegate'.
3 - control drag from Application
to App Delegate
and select 'delegate'. Now your app delegate code will work.
4 - Add a NSLog(@"app success!");
statement in the applicationDidFinishLaunching
method to confirm you did everything correctly, hit run, watch the window pop up and the NSLog output into the console, and congratulate yourself for making an Apple product work the way it should have been designed to work.
I fixed the problem by opening "Xcode-Macintosh HD" instead of "Xcode- Developer" after searching it from spotlight. (Spotlight is the magnifying glass in the top right)
I have solved this problem by removing duplicate reference from project settings -> build phases -> copy bundle references