UIImageView error with OCUnit

243 views Asked by At

am using OCUnit to test my application however am running into some trouble. When I attempt to include a class that contains an instance variable of type UIImageView, I get the following error: "Expected specifier-qualifier-list before UIImageView"

My declaration code is:

UIImageView *_icon;

I can't work out whats causing this and it only happens when I attempt to build my application using my test target.

Thanks

1

There are 1 answers

4
Nick Curran On BEST ANSWER

Your test target doesn't know what UIImageView is. It needs its own precompiled-header referencing UIKit (or you could import UIKit in that file), and it needs to link that framework.