Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RAMilewski

macrumors newbie
Original poster
Sep 25, 2006
4
0
Northern California
I'm getting the following error:

'NSInvalidArgumentException', reason: '*** -[CLLocationManager <ignored selector>]: unrecognized selector sent to instance 0x148eb0'

in this code:

Code:
-(void)begin
{
    // turn on the network activity spinner in the menu bar and set up the location manager
   [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
   locationManager = [[CLLocationManager alloc] init];
	
   // set the delegate to us, set the accuracy and start updating
   locationManager.delegate = self;
   locationManager.distanceFilter = 500;  
   locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;
   [locationManager startUpdatingLocation];
}

A bit of noodling with GDB indicates that the problem is the line:

locationManager.desiredAccuracy = kCLLocationAccuracyKilometer;

(i.e. if I set a breakpoint at that line the program runs up to that point. pressing the GDB Continue button throws the error and the program counter continues to point at that line.)

So the question is: Is this really the problem? ...and if not where else should I be looking?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.