I have an app that needs to detect a nearby (in range for Bluetooth LE) devices running the same application and iOS 7.1. I've considered two alternatives for the detection:
- Having the devices act as iBeacons and detect iBeacons in range
- Using CoreBluetooth (like in Vicinity implementation here) to create a BLE peripheral, advertise that and scan the peripherals
It seems that the option 1 is out of the question because:
- It may take at least 15 minutes for iOS to detect entering a beacon region when the application is running background (iOS 7.1)
Option 2 seems the way to go, but there are some difficulties regarding the implementation:
- iOS seems to change the peripheral UUID in advertisement packets after a certain period of time (around 15 minutes?). This means that it's not directly possible to identify the advertising device from the advertisement broadcast signal.
Regarding this, I have the following questions:
- Are there any other methods of implementing the nearby device detection I haven't considered?
- Is it possible to identify the device through advertising (or by some other means) so that option 2 would work?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…