Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Implicit declaration of function objc_getAssociatedObject is invalid in C99

Tags:

objective-c

I'm trying to use Associated Objects on my objective-c category and I'm getting this warning.

Implicit declaration of function 'objc_getAssociatedObject' is invalid in C99

Also I'm using arc if that makes a difference.

like image 321
Christian Schlensker Avatar asked Feb 23 '12 07:02

Christian Schlensker


1 Answers

have you added

#import <objc/runtime.h>

at the beginning of your file?

like image 104
Bryan Chen Avatar answered Nov 15 '22 19:11

Bryan Chen