Skip to content

Commit

Permalink
add check if proximityUUID exists to prevent conflicts with other lib…
Browse files Browse the repository at this point in the history
…rary as indicated in an issue of the library: frostney#35
  • Loading branch information
Christian Ost committed Mar 6, 2017
1 parent 4b58ddf commit ceea662
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions RNBeacon.m
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ -(void) locationManager:(CLLocationManager *)manager didRangeBeacons:

-(void)locationManager:(CLLocationManager *)manager
didEnterRegion:(CLBeaconRegion *)region {
if (! [region respondsToSelector:@selector(proximityUUID)]) {
return;
}

NSDictionary *event = @{
@"region": region.identifier,
@"uuid": [region.proximityUUID UUIDString],
Expand All @@ -242,6 +246,10 @@ -(void)locationManager:(CLLocationManager *)manager

-(void)locationManager:(CLLocationManager *)manager
didExitRegion:(CLBeaconRegion *)region {
if (! [region respondsToSelector:@selector(proximityUUID)]) {
return;
}

NSDictionary *event = @{
@"region": region.identifier,
@"uuid": [region.proximityUUID UUIDString],
Expand Down

0 comments on commit ceea662

Please sign in to comment.