troystribling / BlueCap

iOS Bluetooth LE framework
MIT License
715 stars 115 forks source link

Enable startAdvertising with both a region and a list of UUIDs #50

Open elefthei opened 7 years ago

elefthei commented 7 years ago

Hi BlueCapKit maintainer,

The peripheralManager has two versions of the startAdvertising function, one takes in a beacon region as an argument and the other one takes a list of UUIDs to advertise as an argument. This MR adds a version of startAdvertising that takes in both arguments, as well as the peripheral name. We found the more generic case to give us better flexibility. We also wrote unit tests make sure the expected behavior happens either when self.isAdvertising is on or off. We would like to merge that to upstream as soon as possible.

troystribling commented 7 years ago

I am surprised this works. The advertisement packet is not that large. Can an iBeacon and services both be advertised?

Could you also write a simple test app, based on the PeripheralManager app, that advertises an iBeacon and services. Place it in the examples directory.