草庐IT

CBService

全部标签

ios - CBCentralManager , CBService 委托(delegate)方法将在 iOS6 中以后台模式调用

我正在使用Apple核心蓝牙示例。外围设备在一台iPhone设备的前台运行。我在一台设备上运行cbcentral客户端应用程序。当两个应用程序都处于前台状态时,它配对良好。我的需要是当我运行客户端时cbcentral客户端在后台,没有调用委托(delegate)方法,我在其中提到了本地通知。通知不会以后台模式出现。我可以像使用NSUrlConnection一样使用NSOperation来运行蓝牙委托(delegate)方法吗?它可以在最新的iOS版本中运行吗?我检查了它,但它不起作用。代码:-(void)peripheral:(CBPeripheral*)aPeripheraldidU