Skip to content

Commit dac1730

Browse files
committed
iOS 3.15.2
1 parent bdf7f90 commit dac1730

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

versioned_docs/version-3.0/sdk-installation-ios.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,3 +352,21 @@ let configurationBuilder = AdaptyConfiguration
352352
```
353353

354354
See more details on how to finish transactions in the [guide](ios-transaction-management).
355+
356+
### Clear data on backup restore
357+
358+
When a user restores their app from an iOS backup, the Adapty SDK can detect this and automatically clear its cached data to start fresh. This prevents potential issues with duplicate profiles and ensures clean analytics data.
359+
360+
Enable this if you want to ensure a fresh SDK state after backup restoration. Keep it disabled (default) if you want to preserve SDK data when users restore from backups.
361+
362+
To enable automatic data clearing on backup restore, set `clearDataOnBackup` to `true`.
363+
364+
:::note
365+
This only clears the SDK's local cache. The user's actual purchases and subscriptions remain safe and are stored with Apple and in Adapty's servers.
366+
:::
367+
368+
```swift showLineNumbers
369+
let configurationBuilder = AdaptyConfiguration
370+
.builder(withAPIKey: "YOUR_PUBLIC_SDK_KEY")
371+
.with(clearDataOnBackup: true) // default – false
372+
```

0 commit comments

Comments
 (0)