You need to find the service UUID that you are interested in, in my case it works fine,
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:YES], CBCentralManagerScanOptionAllowDuplicatesKey, nil]; [self.centralManager scanForPeripheralsWithServices:@[[CBUUID UUIDWithString:SERVICE_UUID]] options:options];
and when he finds a device that advertises the same service UUID, it will appear on the screen that you indicated above.
handle did Discoverperipherel as follows:
-(void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI{ _discoveredPeripheral = peripheral; if(![self.mRemoteDevices containsObject:_discoveredPeripheral]) { NSArray *peripherels = [self.centralManager retrievePeripheralsWithIdentifiers:@[_discoveredPeripheral.identifier]]; [self.mRemoteDevices addObject:[peripherels objectAtIndex:0]]; } }
source share