1

I am developing an application to find a beacon. But i have a problem that is i can only find a beacon which I have defined in code but i want to find beacon dynamically which i dont know the UUID. And is that possible to find a beacon without location service? Here is my just code i do not get any error.. I just want to access region without location service ON..

    NSUUID *beaconUUID = [[NSUUID alloc] initWithUUIDString:@"D57092AC-DFAA-446C-8EF3-C81AA22815B5"];
    NSString *regionIdentifier = @"us.iBeaconModules";
    CLBeaconRegion *beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:beaconUUID identifier:regionIdentifier];
    self.locationManager = [[CLLocationManager alloc] init];
    if([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) {
        [self.locationManager requestAlwaysAuthorization];
    }
    self.locationManager.delegate = self;
    self.locationManager.pausesLocationUpdatesAutomatically = NO;
    [self.locationManager startMonitoringForRegion:beaconRegion];
    [self.locationManager startRangingBeaconsInRegion:beaconRegion];
kalpesh
  • 1,285
  • 1
  • 17
  • 30
  • 1
    Possible duplicate of [Search for all iBeacons and not just with specific UUID](http://stackoverflow.com/questions/18784285/search-for-all-ibeacons-and-not-just-with-specific-uuid) – LoVo Dec 30 '15 at 09:53

1 Answers1

4

No, you can not use iBeacons without the location services.

The reason behind is this is probably has to do with privacy, since with iBeacons you can track someones location. Thus if the user turned of the location services it means they do not want you app to track their location.

You could of course use the bluetooth stack to detect you iBeacons but to my knowledge you will have to pair with the beacon first before you can detect its presence.

rckoenes
  • 69,092
  • 8
  • 134
  • 166
  • Thank you rckoenes for your kind response. but what is the actual use of BLE? – kalpesh Dec 30 '15 at 10:08
  • iBeacons are based on BLE, but use the `CLLocationManager` which requires location services. – rckoenes Dec 30 '15 at 10:10
  • Ok. one last question then what is the difference between geo fencing technology and IBeacon technology? in a geo fencing we are set region and in ibeacon also we are creating region. Means both are same. I think It does not any sens. right... – kalpesh Dec 30 '15 at 10:14
  • And can i get the UUID dynamically from the CLLocationManager delegare? Not the static UUID. – kalpesh Dec 30 '15 at 10:19
  • A geo fenced regions use GPS coordinates to check if the user in in the region. You can only set a limited number of regions. iBeacons us BLE to detect the presence of the region, this could even be a moving object and you are not limited as much as with geo fenced regions. You can only monitor iBeacons can only be monitored if you know there UUID. – rckoenes Dec 30 '15 at 10:26