2

Using the CoreBluetooth framework is it possible to change the peripheral name of an iPhone that is advertising in peripheral mode?

For example: I would like the peripheral iPhone to broadcast a custom name and have another iPhone be able to read the name upon central mode scan.

Is it possible to set the GAP name on a peripheral advertising iPhone?

Michael Amici
  • 308
  • 1
  • 4
  • 18

1 Answers1

1

You must modify the Advertising Data when starting the Advertising. Add a Complete Local Name AD field.

[myPeripheralManager startAdvertising:@{ CBAdvertisementDataLocalNameKey:
    INSERT_NAME_HERE }];    
Bogdan Alexandru
  • 5,394
  • 6
  • 34
  • 54
  • This name will only be available if the advertising device is in the foreground. If it is in the background the local name key won't be advertised. I had to also create a readable characteristic in case the name isn't available. – Felix Dumit Apr 02 '15 at 17:23