Skip to content

Instantly share code, notes, and snippets.

@ennioma
Created June 10, 2014 08:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ennioma/40ce428229f700193dd3 to your computer and use it in GitHub Desktop.
Save ennioma/40ce428229f700193dd3 to your computer and use it in GitHub Desktop.
Turn On iBeacon Advertising
- (void)advertise
{
CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:kSomeUUID major:1 minor:1 identifier:kSomeId];
NSDictionary *beaconPeripheralData = [region peripheralDataWithMeasuredPower:nil];
[self.peripheralManager startAdvertising:beaconPeripheralData];
NSLog(@"Advertising on for the region: %@.", region);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment