title: startUpdatingLocation is working only when wifi is ON but not when only 3G in ON
body: <p>i have tried to get the longitude/latitude of the user current location, my code is simply this :</p>
  
  <p><strong>MyLocationManager.h</strong></p>
  
  <pre><code>@interface MyLocationManager : NSObject
  
  +(MyLocationManager*)sharedInstance;
  -(void)checkAndStartLocationManager;
  -(void)stopUpdatingLocation;
  @end
  </code></pre>
  
  <p><strong>MyLocationManager.m</strong></p>
  
  <pre><code>+ (MyLocationManager*)sharedInstance
  {
      static id  _sharedInstance = nil;
  
      static dispatch_once_t oncePredicate;
  dispatch_once(&amp;oncePredicate, ^{
      _sharedInstance = [[self alloc] init];
      MyLocationManager *instance = _sharedInstance;
      instance.locationManager = [CLLocationManager new];
      instance.locationManager.delegate = instance;
      instance.locationManager.distanceFilter = 100;
      instance.locationManager.desiredAccuracy = kCLLocationAccuracyBest;
      instance.locationManager.pausesLocationUpdatesAutomatically = YES;
      instance.locationManager.activityType = CLActivityTypeOtherNavigation;
  });
  return _sharedInstance;
  }
  
  -(void)checkAndStartLocationManager
  {
  switch([CLLocationManager authorizationStatus])
  {
      case kCLAuthorizationStatusAuthorizedWhenInUse:
          [self startUpdatingLocation];
          break;
  
      case kCLAuthorizationStatusNotDetermined:
              if ([self.locationManager respondsToSelector:
                   @selector(requestWhenInUseAuthorization)])
              {
                  [self.locationManager requestWhenInUseAuthorization];
              }
          }
          break;
  
      case kCLAuthorizationStatusRestricted:
          break;
  
      case kCLAuthorizationStatusDenied:
          break;
  
      case kCLAuthorizationStatusAuthorizedAlways:
          [self startUpdatingLocation];
          break;
  
          default:
          break;
  }
  }
  
  -(void)startUpdatingLocation
  {
    [self.locationManager startUpdatingLocation];
  }
  
  - (void)locationManager:(CLLocationManager *)manager
  didChangeAuthorizationStatus:(CLAuthorizationStatus)status
  {
  switch([CLLocationManager authorizationStatus])
  {
      case kCLAuthorizationStatusAuthorizedWhenInUse:
          [self startUpdatingLocation];
          break;
  
      case kCLAuthorizationStatusNotDetermined:
          break;
  
      case kCLAuthorizationStatusRestricted:
          break;
  
      case kCLAuthorizationStatusDenied:
          break;
  
      case kCLAuthorizationStatusAuthorizedAlways:
          [self startUpdatingLocation];
          break;
  
          default:
          break;
  }
  }
  
  - (void)locationManager:(CLLocationManager *)manager didUpdateLocations:    (NSArray *)locations
  {
      CLLocation *location = [locations lastObject];
      NSString*locationInfo = [NSString stringWithFormat:@"lat - %f, lon -  %f", location.coordinate.latitude, location.coordinate.longitude];
      NSLog(@"Location is %@", locationInfo);
     [self.locationManager stopUpdatingLocation];
  }
  
  - (void)locationManager:(CLLocationManager *)manager didFailWithError: (NSError *)error
  {
      NSLog(@"didFailWithError: %@", error);
  }
  </code></pre>
  
  <p>I am using ios 8 and tested on iphone 5 device. Whenever i call,</p>
  
  <pre><code>[[MyLocationManager sharedInstance] checkAndStartLocationManager];
  </code></pre>
  
  <p>If wifi on phone is ON then only </p>
  
  <pre><code>didUpdateLocations 
  </code></pre>
  
  <p>is getting called.
  If <strong>wifi is OFF</strong> and only <strong>3G in ON</strong> then i <strong>always received error</strong> as,</p>
  
  <p><strong>Error Domain=kCLErrorDomain Code=0 "The operation couldn’t be completed. (kCLErrorDomain error 0.)"</strong></p>
  
  <p>Please help !!!</p>