ioscore-bluetoothibeaconestimoteandroid-ibeacon

Unique notification for each Beacon (more than 20 beacons)


I'm building an iOS App, in which I would wish to handle more than 20 iBeacons. Basically all beacons added to the web portal have to be handled by the App. Since there is an iOS restriction to number of region to be monitored as 20, I'm unable to give different local notifications for beacons in same region (having same UUID).

Is there any way to handle this?


Solution

  • A few points:

    1. The 20 region limit applies to the number of CLRegion objects that can be registered by a single app. It does not mean you can only detect 20 beacons. Since each CLRegion object can leave the major and/or minor nil (making the fields a wildcard), each one can match billions of beacons.

    2. Beacon apps typically use local notifications, not push notifications.

    The way you set up many different notifications to come from many different beacons is like this:

    1. Define a single wildcard region that matches all of your beacons. (Or a few regions if needed for background triggering).

    2. Start monitoring and ranging for each of these regions.

    3. In the didRangeBeacond:inRegion callback keep a flag for each individual beacon to see if you have sent a notification for it before. If not, set the flag to true and trigger a local notification specific to that beacon's identifiers.