2014年2月18日 星期二

BLE回連 in iOS7

NSUUID *uuid = [[NSUUID alloc]initWithUUIDString:savedUUID];//where savedUUID is the string version of the NSUUID you've saved somewhere

NSArray *peripherals = [_cbCentralManager retrievePeripheralsWithIdentifiers:@[uuid]];

for(CBPeripheral *periph in peripherals)
{
    [_cbCentralManager connectPeripheral:peripheral options:nil];
}

沒有留言:

張貼留言