Short answer
Try reinstalling Xcode. The version of Cocoa.framework
you're compiling against is screwed up somehow. This will give you a pristine copy, since the version you compile against is inside the Xcode app bundle.
Long answer
For me, anyways, I managed to mangle the contents of NSTableCellView.h
.
This was giving me errors like this:
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:21: prefix attribute must be followed by an interface or protocol
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:29: extraneous closing brace ('}')
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:33: unexpected '@' in program
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:37: unexpected '@' in program
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:38: unexpected '@' in program
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:42: unexpected '@' in program
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:46: unexpected '@' in program
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:50: unexpected '@' in program
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/AppKit.framework/Headers/NSTableCellView.h:52: '@end' must appear in an Objective-C context
<unknown>:0: error: /Applications/Xcode6-Beta5.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:13: could not build module 'AppKit'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
<unknown>:0: error: could not build Objective-C module 'Cocoa'
The actual error messages led me to the line in question, where I had overwritten an entire @interface
declaration with just the letter x
. I just fixed that error, and it compiled again.
If you're not sure what exactly you need to fix, just reinstall Xcode.