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:
- 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" }];
- 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.
沒有留言:
張貼留言