CLLocation can't be found even though <CoreLocation/CoreLocation.h> is imported

5.4k views Asked by At
#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>

@interface SomeClass : NSObject
{
    CLLocation *location;
    //...
}

//...

Code seems okay, right? But I still get "Unknown type name 'CLLocation'", even though CoreLocation.framework is imported to "Link Binary with Libraries" and CoreLocation.h is imported.

This error occured after I added a new target to the project - "Cocoa Touch Unit Testing Bundle". CoreLocation.framework is imported to this target, too.

1

There are 1 answers

0
Queshi Zakir On BEST ANSWER

Removing and adding the framework back is the best solution through which i solved a same problem.Also make sure you have added framework to unit test project.