0

I’m developing an iOS app as a ‘Peripheral’, where services are added to ‘PeripheralManager’. Is there a way to check what services exists at a later time?

Use case: let’s say I’m about to start advertising and want to make sure my ‘CustomService’ exists in local ‘GATT Profile’ and will be discoverable to the ‘central’.

How can I check this programmatically?

AnonProgrammer
  • 239
  • 1
  • 11
  • Wouldn’t your app “know” what service you have added to your peripheral?; it’s your code. – Paulw11 Jan 15 '20 at 21:56
  • @Paulw11 I observed multiple occasions where peripheral and central could not reconnect. I checked logs of central device which said it couldn't discover a missing service. I added a workaround that removes services (dont want duplicates in ble stack), then adds them back right before advertising. I already had code to recreate services if not restored, before issue was observed. – AnonProgrammer Jan 15 '20 at 23:50

0 Answers0