2014年3月13日 星期四

CoreBluetooth[WARNING] has no restore identifier but the delegate implements the centralManager:willRestoreState: method. Restoring will not be supported!

This is in regards to CoreBluetooth's save/restore optional feature, see "Opt In to State Preservation and Restoration" part of the documentation for more details.
What looks to be happening is that you are implementing the right delegate method to use this feature but you are not providing a restoration identifier in your call to initialize the CBCentralManager.
There are two options to resolve the warning:
  1. If you want to use this feature you should provide an identifier to CBCentralManager like so:
    myCentralManager = [[CBCentralManager alloc] initWithDelegate:self queue:nil options:@{ CBCentralManagerOptionRestoreIdentifierKey: @"myCentralManagerIdentifier" }];
  2. If you don't want to use this feature then remove the centralManager:willRestoreState:method from your delegate.
Doing either one should resolve your warning.

沒有留言:

張貼留言