Skip to content

Commit acfc0b1

Browse files
committed
Add comments in beaconFound method
1 parent 91b5186 commit acfc0b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SensingKit/SKEddystoneProximity.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ - (void)beaconScanner:(ESSBeaconScanner *)scanner didUpdateBeacon:(id)beaconInfo
8282

8383
- (void)beaconFoundWithInfo:(ESSBeaconInfo *)beaconInfo
8484
{
85+
// If this is an Eddystone beacon
8586
if (beaconInfo.beaconID.beaconType == kESSBeaconTypeEddystone) {
8687

8788
// 16 bytes long data. 10byte namespaceId + 6byte instanceId
@@ -90,7 +91,8 @@ - (void)beaconFoundWithInfo:(ESSBeaconInfo *)beaconInfo
9091
// Separate the namespaceId (10 bytes)
9192
NSData *namespaceData = [beaconId subdataWithRange:NSMakeRange(0, 10)];
9293

93-
if (!self.namespaceFilter || [self.namespaceFilterData isEqualToData:namespaceData]) {
94+
// If filter doesn't exist at all OR filter equals with the device's namespaceId
95+
if (!self.namespaceFilterData || [self.namespaceFilterData isEqualToData:namespaceData]) {
9496

9597
// Convert NSData bytes into NSString
9698
NSString *namespaceId = [SKEddystoneProximity hexStringFromData:namespaceData];

0 commit comments

Comments
 (0)