0

I have an iPhone app that is using CoreLocation.

Upon first installing the app, the iPhone system message is displayed asking whether or not the user wants to allow location services, if they click yes, my app suddenly displays the first screen of my app (I'm using a navigation controller), and crashes. This is what I see in the log -

warning: UUID mismatch detected with the loaded library - on disk is:
/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony
=uuid-mismatch-with-loaded-file,file="/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS3.0.sdk/System/Library/PrivateFrameworks/CoreTelephony.framework/CoreTelephony"
Program received signal:  “EXC_BAD_ACCESS”.

And the stack trace looks like this alt text

My code isn't too far off from the LocateMe sample (which works on my device). I have this:

CLLocationManager *clLocationManager = [[CLLocationManager alloc] init];
clLocationManager.delegate = self;

if (clLocationManager.locationServicesEnabled) {
    [clLocationManager startUpdatingLocation];
} else {
    self.searchBar.placeholder = @"Enter location";
}

Any idea on waht I'm doing wrong?

Community
  • 1
  • 1
bpapa
  • 21,409
  • 25
  • 99
  • 147

2 Answers2

1

does your navigation controller support CLLocationManagerDelegate? it looks like it's crashing trying to send you an event.

what does your locationManager:didUpdateToLocation:fromLocation: function look like?

David Maymudes
  • 5,664
  • 31
  • 34
  • it looks like it was because my delegate, which was self, was set to nil. see my answer (and the linked to question if you can help out there) – bpapa Sep 03 '09 at 16:04
1

It looks like this is a byproduct of this question

To solve the problem, I wound up following this approach

Basically, in my ViewController's dealloc method -

- (void)dealloc {
locationManager.delegate = nil;
[locationManager release];
}
Community
  • 1
  • 1
bpapa
  • 21,409
  • 25
  • 99
  • 147