peripheralManager(_:willRestoreState:)
Tells the delegate the system is about to restore the peripheral manager.
Declaration
optional func peripheralManager(_ peripheral: CBPeripheralManager, willRestoreState dict: [String : Any])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.