0

在我当前使用的应用程序中

    self.locationManager = [[CLLocationManager alloc] init];
    if ([_locationManager respondsToSelector:@selector(requestAlwaysAuthorization)])/
         [_locationManager requestAlwaysAuthorization];
    //self.locationManager.allowsBackgroundLocationUpdates = YES;
    self.locationManager.delegate = self;
    [self.locationManager startMonitoringForRegion:tempRegio
    [self.locationManager startRangingBeaconsInRegion:beaconRegion];

在这种情况下,我不需要知道用户的位置,我的应用程序仍然要求它会使用你当前的位置,即使你没有使用这个应用程序

这对最终用户来说很烦人,而且它在状态栏上不断显示紫色箭头,指示该应用程序使用 GPS(它没有)

我的问题是

我们能否有一种机制,我们可以在不使用 CLLocationManager 的情况下扫描信标

一种可能的解决方案是使用 CBCentralManager,但我没有找到可以使用它来检测信标/信标的正确方法

谢谢

4

0 回答 0