Fixed in https://github.com/badbundle/vault-app/pull/610 (merged as 09adf477).
Cause: the simulator didn't reproduce the bug, even with Face ID enrolled, so the cause isn't confirmed. The fix no longer depends on reading the password item's attributes.
How the status is kept now:
- When a password is set, a non-secret keychain record,
backupPasswordMetadata(stored withstoreSilent, so no Face ID), notes that it's set and when. The status is read from that record. - Older passwords: they get a record the next time the password is loaded after authentication, from Export, Auto-Backup or Restore. It has no date if the attributes can't be read.
- No password: the record is removed when loading finds no password.
- Failed reads: a failed read keeps the status that was already known instead of dropping to unknown.
Delete All Data: deleteVault() doesn't remove the backup password, so the record stays consistent with it.
Tests: new store and data-model tests use a fake keychain whose attribute read throws, as a device would. They cover revisiting the page, relaunching, backgrounding, changing the password, and passwords set before this change.