Go Back   MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Sep 3, 2008, 02:06 PM   #1
RAMilewski
macrumors newbie
 
Join Date: Sep 2006
Location: Northern California
CLLocationManager NSInvalidArgumentException

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?
RAMilewski is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > iPhone/iPad Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
CLLocationManager Authorization erdinc27 iPhone/iPad Programming 4 May 22, 2013 09:50 AM

Forum Jump

All times are GMT -5. The time now is 03:46 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC