问题描述:

Possible Duplicate:

Interface type cannot be statically allocated?

Here is my code just like others:

TZNotifications.h

extern NSString *const TZNotificationKeywordAuthentication;

TZNotifications.m

NSString *const TZNotificationKeywordAuthentication = @"NOTIFICATION_KEYWORD_AUTHENTICATION";

But I get two errors with the code like this:

网友答案:

Replace 'const' and type declaration:

TZNotifications.h

extern const NSString *TZNotificationKeywordAuthentication;

TZNotifications.m

const NSString *TZNotificationKeywordAuthentication = @"NOTIFICATION_KEYWORD_AUTHENTICATION";
网友答案:

Thank you guys. Turns out I had stupidly add a nonsense string at the end of one of my header files causing this weird error. Sorry about that...

相关阅读:
Top