Instance Method

peripheralManager:willRestoreState:

Tells the delegate the system is about to restore the peripheral manager.

Declaration

- (void)peripheralManager:(CBPeripheralManager *)peripheral willRestoreState:(NSDictionary<NSString *,id> *)dict;

Parameters

peripheral

The peripheral manager undergoing state restoration.

dict

A dictionary that contains information about the peripheral manager, which the system preserved when the app terminated. For the available keys to this dictionary, see Peripheral Manager State Restoration Options.

Discussion

For apps that opt in to the state preservation and restoration feature, Core Bluetooth invokes this method when relaunching your app into the background to complete some Bluetooth-related task. Use this method to synchronize the state of your app with the state of the Bluetooth system.

See Also

Monitoring Changes to the Peripheral Manager’s State

- peripheralManagerDidUpdateState:

Tells the delegate the peripheral manager’s state updated.

Required.

Peripheral Manager State Restoration Options

Keys used to specify options when restoring the state of a peripheral manager.