-
-
Save hjanuschka/6c5944ec6cf04a9acb4220f44edfacb5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
//create UUID with xamooms Beacon UUID | |
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"de2b94ae-ed98-11e4-3432-78616d6f6f6d"]; | |
//create beacon region your major | |
self.beaconRegion = [[CLBeaconRegion alloc] | |
initWithProximityUUID:uuid | |
identifier:@"my xamoom system beacons"]; | |
//init locationmanager | |
self.locationManager = [[CLLocationManager alloc] init]; | |
self.locationManager.delegate = self; | |
//request location permission | |
if ([self.locationManager respondsToSelector:@selector(requestAlwaysAuthorization)]) { | |
[self.locationManager requestAlwaysAuthorization]; | |
} | |
//start monitoring beacons | |
[self.locationManager startMonitoringForRegion:self.beaconRegion]; | |
// BEACONS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment