BackgroundRestoreConfig
public struct BackgroundRestoreConfig
Contains all required configurations for background restoration.
-
A restore identifier helps uniquely identify which device is triggering background restoration.
Declaration
Swift
public let restoreIdentifier: RestoreIdentifier
-
A background restorer is required to handle the results of a background restoration.
Declaration
Swift
public let backgroundRestorer: BackgroundRestorer
-
A listen restorer is required for any potential unhandled listens when restoring to a connected peripheral.
Declaration
Swift
public let listenRestorer: ListenRestorer
-
The launch options from
application(_:didFinishLaunchingWithOptions:)
is required to parse the restore identifier.Declaration
Swift
public let launchOptions: LaunchOptions
-
Convenience return of bluetooth central keys from the launch options.
Declaration
Swift
public var centralKeys: [String]? { get }
-
If CoreBluetooth is restoring from background, the bluetooth central keys from launch options will contain the designated restore identifier.
Declaration
Swift
public var isRestoringFromBackground: Bool { get }
-
Initializes a container for all required configurations necessary to support background restoration.
Declaration
Swift
public init( restoreIdentifier: RestoreIdentifier, backgroundRestorer: BackgroundRestorer, listenRestorer: ListenRestorer, launchOptions: LaunchOptions)
Parameters
restoreIdentifier
a restore identifier helps uniquely identify which device is triggering background restoration.
backgroundRestorer
a background restorer is required to handle the results of a background restoration.
listenRestorer
a listen restorer is required for any potential unhandled listens when restoring to a connected peripheral.
launchOptions
the launch options from
application(_:didFinishLaunchingWithOptions:)
is required to parse the restore identifier.