Reputation: 1198
I have a script that turns the phone into a beacon and broadcasts its location using the iBeacons functionality. Here is the very simple code:
//--- Start broadcasting
NSUUID *uuid = [[NSUUID alloc] initWithUUIDString:@"some-static-uuid"];
self.beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid major:@"1" minor:@"2" identifier:@"com.myidentifer"];
On the SAME device, I want to listen for other beacons close by... So I have a similar script running and I star the "ranging" service.
Problem that I am running into is that it doesn't seem to work if I broadcast and listen at the same time... I have a script running that alternates the listening and broadcasting, and this seems to work "ok"... But I would really rather have these functions running simultaneously.
Is this even possible?
Upvotes: 0
Views: 157
Reputation: 10215
No, it is an hardware limitation. If the bluetooth in the device is broadcasting an ibeacon signal (peripheral mode), it is operating in a different mode and it cannot at the same time scan for ibeacons.
Upvotes: 1