# Custom Storage

The iOS SDK persists two internal values and keeps both in `UserDefaults`. From **1.1.0** the storage engine is fixed: `DetourConfig` takes no storage adapter, so no storage adapter can be supplied.

## What the SDK stores

- `DetourFirstEntranceFlag` — set on the first launch, so deferred matching runs once per install
- `Detour_deviceId` — a UUID generated the first time analytics send an event

Both are stored in `UserDefaults.standard` and are preserved across app restarts. Deleting the app clears them.

## Reset for testing

To run the deferred flow again on the same install:

```swift
Detour.shared.resetSession(allowDeferredRetry: true)
```

This clears the in-memory session guard and the first-entrance flag, so the next `resolveInitialLink` call attempts a deferred match again. The analytics device id is not changed.

## Related pages

- [Usage](https://detour.swmansion.com/docs/sdk/ios/sdk-usage)
- [API Reference](https://detour.swmansion.com/docs/sdk/ios/api-reference)
- [Testing & Troubleshooting](https://detour.swmansion.com/docs/sdk/ios/testing)