BackupExclusion class
Excludes the wallet DB directory from iOS device/iCloud backups
(NSURLIsExcludedFromBackupKey, set natively in AppDelegate.swift).
WHY (FR-14 / spec §3.2): the DB's encryption key is a ThisDeviceOnly Secure-
Enclave key that never leaves the device. The DB itself sits under Application
Support, which iCloud/iTunes back up by default. So a user who restores an iPhone
backup onto a NEW device (a new phone, or an erase-and-restore) gets the DB back
but NOT the key → the wallet can't be opened → the "Wallet setup couldn't finish"
(needsRecovery) screen. Excluding the DB dir means a device-restore brings back no
wallet data, so the app lands on the clean Welcome → Restore flow instead — and the
encrypted (and, off-device, useless) DB never sits in a cloud backup at all.
iOS-only: Android excludes app data app-wide via allowBackup=false; desktop/web
have no equivalent. The host owns this (the SDK is platform-agnostic and documents
it as the host's responsibility). isIOS is injectable so the gate is testable
without a real platform.
Constructors
- BackupExclusion({MethodChannel? channel, bool? isIOS})
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
exclude(
String path) → Future< void> -
Mark
pathexcluded from backup. BEST-EFFORT: a failure NEVER blocks boot — the wallet still works; the only loss is a backup would carry the encrypted (cross-device-unusable) DB. A no-op off iOS. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- channelName → const String