You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
914 B
35 lines
914 B
1 year ago
|
/*
|
||
|
BabyBluetooth
|
||
|
简单易用的蓝牙ble库,基于CoreBluetooth 作者:刘彦玮
|
||
|
https://github.com/coolnameismy/BabyBluetooth
|
||
|
*/
|
||
|
|
||
|
// Created by 刘彦玮 on 15/9/2.
|
||
|
// Copyright (c) 2015年 刘彦玮. All rights reserved.
|
||
|
//
|
||
|
|
||
|
#import "BabyCallback.h"
|
||
|
|
||
|
@implementation BabyCallback
|
||
|
|
||
|
|
||
|
- (instancetype)init {
|
||
|
self = [super init];
|
||
|
if (self) {
|
||
|
[self setFilterOnDiscoverPeripherals:^BOOL(NSString *peripheralName, NSDictionary *advertisementData, NSNumber *RSSI) {
|
||
|
if (![peripheralName isEqualToString:@""]) {
|
||
|
return YES;
|
||
|
}
|
||
|
return NO;
|
||
|
}];
|
||
|
[self setFilterOnconnectToPeripherals:^BOOL(NSString *peripheralName, NSDictionary *advertisementData, NSNumber *RSSI) {
|
||
|
if (![peripheralName isEqualToString:@""]) {
|
||
|
return YES;
|
||
|
}
|
||
|
return NO;
|
||
|
}];
|
||
|
}
|
||
|
return self;
|
||
|
}
|
||
|
@end
|