---
title: CBPeripheralManagerOptionRestoreIdentifierKey
framework: corebluetooth
role: symbol
role_heading: Global Variable
path: corebluetooth/cbperipheralmanageroptionrestoreidentifierkey
---

# CBPeripheralManagerOptionRestoreIdentifierKey

A string containing a unique identifier (UID) for the peripheral manager to instantiate.

## Declaration

```swift
let CBPeripheralManagerOptionRestoreIdentifierKey: String
```

## Discussion

Discussion The value associated with this key is an NSString. The system uses this UID to identify a specific CBPeripheralManager, so the UID must be identical across executions of the app. If your app creates multiple CBPeripheralManager instances, assign each a distinct UID to prevent state from being mixed up between them. In scene-based apps that adopt UISceneDelegate, launchOptions is always nil on launch, so UIApplicationLaunchOptionsBluetoothPeripheralsKey is not available to deliver identifiers. Persist the UID yourself (for example, in UserDefaults) and pass it to init(delegate:queue:options:) on every launch. Providing this key causes Core Bluetooth to call peripheralManager(_:willRestoreState:) with the preserved state when restoration is available. For a description of the state dictionary keys your delegate receives, see Peripheral Manager State Restoration Options.

## See Also

### Initialization Options

- [CBPeripheralManagerOptionShowPowerAlertKey](corebluetooth/cbperipheralmanageroptionshowpoweralertkey.md)
