Region Monitoring not working in iOS if region don't have major

337 Views Asked by At

In my iOs app i am trying to monitor some beacon region on different parameter as follows:

> Method 1 - Region With Only UUID and Identifier :

In above scenario am starting monitoring beacon region with following code where only uuid and identifier given.

CLBeaconRegion *region = [[CLBeaconRegion alloc] initWithProximityUUID:convertedUuid identifier:strIdentifier]; 

Method 2 - Region With UUID , Major and Identifier :

In above scenario am starting monitoring beacon region with following method where uuid, major and identifier value given

CLBeaconRegion  *region = [[CLBeaconRegion alloc] initWithProximityUUID:convertedUuid  major:[self.major intValue] identifier:strIdentifier];

Method 3 - Region with Major Minor and Identifier :

In above scenario am starting monitoring beacon region with following method where all uuid,major,minor and identifier value given

CLBeaconRegion  *region = [[CLBeaconRegion alloc] initWithProximityUUID:convertedUuid  major:[self.major intValue] minor:[self.minor intValue] identifier:strIdentifier];

Now with consideration of above 3 methods i am starting region monitoring with the following:

[self.locationManager startMonitoringForRegion:region];

Unfortunately only with the 3rd method beacons enter and exit delegate are being called. but when i use 1st or 2nd method i could not recieve enter and exit region delegate.

Note : Am not running all the method at once. i use only one method at a time.

can anyone give any feedback or provide any help why other region method is not working but only 3rd method is working?

1

There are 1 best solutions below

0
On

Make sure that no other beacons with same proximityUUID (Method 1) or same proximityUUID and same major (Method 2) are around. When there is another beacon, app will not get exit events because it is still in that region defined by this proximityUUID/major.