How to get CLLocationManager in my app

cocoa, objective-c

Solution

Why are you declaring your own classes with the CL prefix?

Also, the error has nothing to do with the code you showed; it refers to the `#import` line in your implementation file. You're probably doing something like this:

#import "CLLocationManager.h"

instead of the correct way:

#import <CoreLocation/CoreLocation.h>

Don't import individual headers from a framework directly—import its top-level header and let that give you what you need. If compilation is getting to take too long, move the `#import` to your prefix header and make sure you have “Precompile Prefix Header” turned on.

Problem

``` @class CLLocationManager; @interface CLLocationController : NSObject { CLLocationManager *locationManager; } @property (nonatomic, retain) CLLocationManager *locationManager; @end ``` When i write above code is shows me following errors error: CLLocationManager.h: No such file or directory warning: receiver 'CLLocationManager' is a forward class and corresponding @interface may not error: accessing unknown 'delegate' component of a property

Original source