Skip to content

Commit

Permalink
Merge pull request #1 from Artirigo/fix-existence-of-proximity-parameter
Browse files Browse the repository at this point in the history
Include check for existence of proximityUUID
  • Loading branch information
Christian Ost authored Mar 9, 2017
2 parents 4b58ddf + ceea662 commit 75a2f45
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 75a2f45

Please sign in to comment.