StartUpdateLocations in Background, didUpdatingToLocation only called 10-20 times

后端 未结 3 2087
心在旅途
心在旅途 2020-12-01 05:16

Testing Device: iPhone 5 (iOS 7)

I have an app that uses RegionMonitoring and updateLocation. If a region is entered, didEnterRegion<

3条回答
  •  再見小時候
    2020-12-01 05:33

    Use below code in your didEnterRegion Method to start updates again

    [_locationManager startMonitoringSignificantLocationChanges];
    if ([_locationManager respondsToSelector:@selector(setAllowsBackgroundLocationUpdates:)])
    {
        _locationManager.allowsBackgroundLocationUpdates =YES;
    
    }
    [_locationManager startUpdatingLocation];
    

提交回复
热议问题