1
我收到用戶的報告,說我的應用程序在啓動時崩潰。目標C - CLLocationManager崩潰
所以我得到了崩潰報告。用戶在iOS 4.1上。
崩潰日誌如下:
Thu Nov 17 12:23:49 unknown AppName[1481] <Error>: +[CLLocationManager authorizationStatus]: unrecognized selector sent to class 0x3e2ee618
Thu Nov 17 12:23:49 unknown AppName[1481] <Error>: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[CLLocationManager authorizationStatus]: unrecognized selector sent to class 0x3e2ee618'
似乎無法看到什麼錯我的代碼,這裏是我
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error {
// 4.2 and below
NSLog(@"locationManager error = %@", error);
if ([error code] != kCLErrorLocationUnknown) {
[self stopUpdatingLocation:NSLocalizedString(@"Error", @"Error")];
}
}
- (void)locationManager:(CLLocationManager *)manager didChangeAuthorizationStatus:(CLAuthorizationStatus)status
{
// 4.2 & above
NSLog(@"authorization change = %i", status);
}
- (void)stopUpdatingLocation:(NSString *)state {
NSLog(@"stop updatinglocation = %@", self.bestEffortAtLocation);
[locationManager stopUpdatingLocation];
locationManager.delegate = nil;
}
請微啓。
謝謝
三通
D'oh,謝謝... – teepusink