How to deal with `Use of undeclared identifier 'UIDevice'`
Try adding this line at the top of your .m file :
#import <UIKit/UIKit.h>
Adding the framework to the project is useful, but you also have to include the needed headers in your code.
And for Swift 5 users who got here, try
import UIKit