I’m trying to implement a CLLocationManager into my app and I’m getting the following compile time error.
Code in the view controller’s viewDidLoad method:
self.locationManager = [[CLLocationManager alloc] init];
self.locationManager.delegate = self;
self.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
Errors:
_OBJ_CLASS_$_CLLocationManager," referenced from Obj-c-class-ref in AboutLocationViewController.o
_kCLLocationAccuracyBest," referenced from:
-[AboutLocationViewController viewDidLoad] in AboutLocationViewController.o
Symbol(s)not found for architecture arm7
Collect2: Id returned 1 exit status
You probably have not added the CoreLocation.framework inside the Frameworks folder. As a result the linker can’t find the CLLocationManager class.