Skip to content

[Feature] iOS Encrypted Vaults 5/6: Screen Security research spike + implementation #204

Closed

Description

@libravault-xyz

What problem does this solve?

Sub-issue 5 of 6 from #190's dev-agent triage breakdown. Not blocked on the others — can start independently as a research spike. Android's Screen Security toggle uses FLAG_SECURE to block screenshots/screen-recording/casting while a vault is unlocked; iOS has no direct equivalent, so this needs its own investigation before implementation is even well-scoped.

Proposed behaviour

Research phase first:

  • Survey iOS's actual primitives here — likely candidates: hiding/blurring content in the app-switcher snapshot (applicationDidEnterBackground/UIApplication delegate hooks overlaying a blank view before the snapshot is taken), and separately detecting (not preventing — iOS doesn't allow apps to block screen recording the way FLAG_SECURE does) active screen recording via UIScreen.capturedDidChangeNotification to react (e.g. auto-lock the vault) rather than block
  • Document the actual achievable guarantee — it will likely be weaker than Android's (detect-and-react vs. hard-block), and that gap should be written up honestly, not glossed over
  • Implement whatever's found to be achievable, gated behind a user-facing toggle matching Android's (default on)

Acceptance criteria

  • Written comparison of iOS's actual capability vs. Android's FLAG_SECURE guarantee, added to docs/threat-model.md or docs/ios-android-feature-parity.md
  • App-switcher snapshot does not show vault content when the app backgrounds while a vault is unlocked
  • Active screen recording is detected and triggers vault auto-lock (or equivalent reaction), if that's what the research concludes is achievable
  • Toggle exists in Settings, default on, matching Android's UX

Module / component

iOS app

Does this touch a sensitive area?

Borderline — it's a platform-capability research question more than new crypto/key-management code, so no security label per the dev agent's #190 breakdown. Independent of #200-#203; can start any time.

Activity

  1. added
    enhancement
    status:triage
    on Aug 16, 2026
  2. libravault-xyz commented on Aug 16, 2026

    @libravault-xyz
    CollaboratorAuthor

    Handoff note. Sub-issue 5/6 of #190's breakdown. Not blocked on anything — this is a research spike and can start independently, in parallel with #200-#203. Flagging explicitly: iOS very likely cannot match Android's FLAG_SECURE hard-block guarantee (no public API blocks screen recording outright), so the acceptance criteria ask for an honest documented comparison, not a forced claim of parity. Whoever picks this up should feel free to conclude 'iOS's ceiling here is lower than Android's' and write that down rather than over-engineer a workaround.

  3. github-actions commented on Aug 16, 2026

    @github-actions
    Contributor

    Triaged by dev-agent — stopping here, not proceeding to implementation.

    I read the issue, AGENTS.md, .github/agent-policy.yml, and checked the current state of the iOS app and its sibling sub-issues from #190's breakdown before deciding.

    The blocker: none of the foundation this issue needs actually exists on iOS yet.

    This issue's acceptance criteria assume that foundation is already in place:

    • "App-switcher snapshot does not show vault content while a vault is unlocked" — there is no notion of vault-unlocked state on iOS yet; nothing to gate the snapshot-hiding on.
    • "Toggle exists in Settings, default on, matching Android's UX" — Android's toggle (VaultScreenSecurityPreference) lives in the Encrypted Vault settings surface, which doesn't exist on iOS.
    • "Active screen recording is detected and triggers vault auto-lock" — there's no vault lock/unlock state machine on iOS to auto-lock.

    The issue body frames this as independently startable ("Not blocked on the others — can start independently as a research spike"), but that's only true for the research/comparison-writeup half of the acceptance criteria, not the implementation half. Writing UIScreen.capturedDidChangeNotification handling or app-switcher-snapshot blurring against nothing (no vault content screens, no unlocked-state signal) would mean inventing throwaway scaffolding now that #201-#203 will replace, or guessing at integration points two other not-yet-scoped sub-issues will actually define. That's exactly the "two reasonable implementations would look very different" case the dev-agent persona says to stop on, so I'm not opening a branch/PR.

    What would unblock this: #200-#202 landing (at minimum #202, since Screen Security has to attach to real vault content screens and an unlock-state signal) gives this issue concrete integration points. At that point the research half (iOS capability vs. Android's FLAG_SECURE writeup) could even be pulled forward and done alongside #202/#203 rather than waiting for all of them.

    Applying status:needs-info. No branch or PR opened.

  4. added
    status:needs-info
    and removed
    status:triage
    on Aug 16, 2026
  5. github-actions commented on Aug 20, 2026

    @github-actions
    Contributor

    Sweep note (human-merge-sweep, 2026-08-20): the dev-agent's status:needs-info comment above says this issue is blocked because none of its foundation exists yet — specifically citing #200, #201, and #202 as all still open/unimplemented. That's no longer true: #200 (crypto core) merged via #220, #201 (VaultStore equivalent) merged via #315, and #202 (vault UI: create/unlock/list) merged via #334. The unlocked-state signal and real vault content screens this issue's acceptance criteria depend on should now exist. Not re-triaging this myself — leaving the call on whether to re-apply status:triage/status:ready-for-dev to a human, since that's a scoping decision, not a mechanical retry.

  6. libravault-xyz commented on Aug 20, 2026

    @libravault-xyz
    CollaboratorAuthor

    Re-triage (human, via Claude Code). Verified against the actual merged code:

    Foundation (and a starting pattern) is real and in place. Moving status:needs-info → status:ready-for-dev.

  7. added
    status:ready-for-dev
    and removed
    status:needs-info
    on Aug 20, 2026
  8. added
    status:in-progress
    on Aug 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementiosstatus:in-progressstatus:ready-for-dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions