Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIDevice properties not working in static library

Tags:

I have created a static library in Iphone SDK in which I used some UIDevice properties. When I run the app, this xcode show this error UIDevice Undeclared... Even the same code is running perfectly fine while I don't create static libraries and just build the source files.

like image 430
Arsalan Haider Avatar asked Sep 07 '11 09:09

Arsalan Haider


1 Answers

Have you tried adding

#import <UIKit/UIKit.h>

...to the top of your class .h file? I was running into similar problems as you are having, but when I added that import into my .h files that seemed to fix a lot of the errors.

Hope that helps.

Andy

like image 122
andyengle Avatar answered Sep 21 '22 17:09

andyengle