Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happens when two apps monitor the same iBeacon region?

Tags:

ios

ibeacon

Since iOS7.1, iBeacon regions can be monitored without the app being open in the fore- or background. While this is more of a lab situation than a real world problem, I was wondering what happens when two iOS apps both register to monitor the same iBeacon region in the background. Let's say, both apps are set to trigger a local notification when a specific region is entered...

Is there any expected/documented behaviour in this case? E.g. 1) both apps will be triggered? 2) only the last app that registered will be triggered? 3) etc.

like image 309
theremin Avatar asked May 22 '14 11:05

theremin


4 Answers

Both apps will be triggered. I do not believe this is explicitly stated in Apple docs, but by design all apps are sandboxed and are expected to behave independently unless docs say otherwise.

I can confirm this is the way it works from experience because my company makes lots of iBeacon apps, and they are initially built to use the same default UUID/major/minor for Radius Networks' beacons. As a result, when I turn on my iPhone in the proximity of one of these beacons, I get multiple notifications, one for each app monitoring for the same region.

like image 54
davidgyoung Avatar answered Nov 11 '22 01:11

davidgyoung


Both app will be triggered. I have some beacons in my house , if i dont turn bluetooth off when i enter or leave, i get one notification for each app i m working on ... :p

like image 24
mad_mask Avatar answered Nov 11 '22 03:11

mad_mask


I can confirm what Alexander Vasenin said as well. I tested it on iOS 9.0.2.

If your situation allows it, you can "bypass" this by setting one of your apps to use a more "strict" region, for example:

  1. app: CLBeaconRegion *beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid identifier:@"identifier"];

  2. app: CLBeaconRegion *beaconRegion = [[CLBeaconRegion alloc] initWithProximityUUID:uuid major:69 identifier:@"identifier"];

like image 41
Nejc Avatar answered Nov 11 '22 03:11

Nejc


@Alexander Vasenin: I can confirm this. There seems to be an ios 8.3 problem where no 2 apps can monitor the SAME region. In that case only one app gets the responses.

like image 2
woens Avatar answered Nov 11 '22 03:11

woens