僅在感興趣的服務中掃描可用外圍裝置

迅速:

let services = [CBUUID(string: SERVICE1_UUID), CBUUID(string: SERVICE2_UUID)]
centralManager.scanForPeripherals(withServices: services, options: nil)

目標 C:

NSArray *services = @[[CBUUID UUIDWithString:SERVICE1_UUID], [CBUUID UUIDWithString:SERVICE2_UUID]];
[centralManager scanForPeripheralsWithServices:services options:nil];