A few things:
When you create a beacon area, you can either combine only the UUID, UUID and main value, or the lower and lower UUID value.
If you specify only the UUID, notifications about the entry / exit of your beacon will not contain information about the major / minor value.
Similarly, if you create a region with a UUID and a primary but not secondary value, your beacon entry / exit messages will include the UUID of the beacon and primary, but not minor.
The easiest way is to create a separate region to reach the unique lighthouse that you are tracking. You will then receive separate entry / exit notifications for each beacon.
If you want several beacons to be part of the same region, but report different primary or primary / secondary values, you need to turn on the beacon range and wait for the call range. When calling with a range, you will get an array of lighthouse objects (and not lighthouse area objects, CLBeacon objects) for all lighthouses that correspond to the current region. The lighthouse objects will include the actual UUID, major and minor for this lighthouse.
If you are in the background and turned on beacon monitoring and range, you will receive a didEnterRegion message (or possibly a status message) followed by a few seconds of ranking information, and then your application will return to sleep.
When your application is in the background, the only real option is to display a local notification and hope that the user wakes up your application again. If the user views this notification, the system asks the user for unlock credentials, if necessary, and then returns the user to your application.
source share