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];