All of the sudden Xcode is giving me an error "unexpected '@' in program" at the beginning of my object @interface
.
This is happening in a bunch of my objects that were previously working...
Here's an example (with errors in comments)
#import <UIKit/UIKit.h>
#import "ONCOChordDiamond.h"
@interface ONCOChordView : UIView //// unexpected '@' in program
{
NSMutableArray* chordDiamonds;
NSUInteger diamondWidth, diamondHeight;
}
@end /////unexpected '@' in program'
So why is Xcode giving me this error? It seems like a bug.
I doubt you're still having the issue, but if you are check the header file. I pasted in code from the web in a class and the quotation marks weren't the standard " ". The marks were stylized with an opening quote and a closing quote because it came from a webpage. Retyping the quote marks fixed it.
You are including the header from a file that is not compiled as Objective C.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With