ipadgpscore-location

What happens on a wifi-only iPad that wants to use core location?


A business customer reports that the app I made for him crashes on his iPad. It crashes just after starting up.

I tested on several iPads without issues. The only thing I can think of is that he has a wifi-only iPad without GPS. And my app uses core-locations.

I implemented the

- (void)locationManager:(CLLocationManager *)manager 
   didFailWithError:(NSError *)error {}

So I thought it would be fine.

But could the use of core location be the reason that the iPad crashes? I know I can solve this with UIRequiredDeviceCapabilities


Solution

  • No, this should not be the reason that the iPad crashes. For example, this works fine on the wifi-only iPad (just tested):

    if (self.locMgr == nil)
    {
        self.locMgr = [[[CLLocationManager alloc] init] autorelease];
        self.locMgr.delegate = self;
    }
    
    if (self.locMgr != nil)
    {       
        if ([self.locMgr respondsToSelector:@selector(startMonitoringSignificantLocationChanges)])
        {
            [self.locMgr startMonitoringSignificantLocationChanges];
        }
    
        [self.locMgr startUpdatingLocation];
    }
    

    }

    It doesn't crash, it even starts the location monitoring based on wifi signals.