I am currently working on an iOS app that is running in the background that requires me to advertise and scan a device using Bluetooth 4.0.
While learning about the Corebluetooth.framework, I found that iOS developers can set two kind of advertising data on the peripheral device.
- local name of the device.
- service UUIDs.
I learned if the peripheral device is running in the background, however, local name will not be advertised. In addition, service UUIDs will be set to overflow area which the central device can only get by using active scanning. However, the active scanning can be running only in the foreground.
At this point I have a question.
If both central and peripheral devices are running in the background, can a central device get service UUIDs which are set on the overflow area by a peripheral device? That is when both iOS applications are running in the background, is it possible to develop an app that each apps are advertising and scanning each other in the background?