Last active
August 29, 2015 14:26
-
-
Save ddwang/7c9b92606d0f82ecdc41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-(void) setupLocationManager | |
{ | |
self.locationManager = [[CLLocationManager alloc] init]; | |
self.locationManager.delegate = self; | |
CLBeaconRegion* region = [[CLBeaconRegion alloc] initWithProximityUUID:[[NSUUID alloc] initWithUUIDString:@"07775DD0-111B-11E4-9191-0800200C9A66"] | |
identifier:@"XY"]; | |
[self startRangingBeaconsInRegion:region]; | |
} | |
-(void) locationManager:(CLLocationManager *) manager | |
didRangeBeacons:(NSArray *) beacons | |
inRegion:(CLBeaconRegion *) region | |
{ | |
for (CLBeacon* b : beacons) | |
NSLog(@"Gotcha %@", b); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment