Skip to content

Draft: add Parental Control toggle to settings view

Arthur Norat requested to merge arthurnorat/vlc-ios:kids-mode into master

Description

Implements parental control independent from passcode lock

Features

This MR introduces a standalone Parental Control system with its own dedicated Keychain secret, fully independent from the existing Passcode Lock mechanism.

When the user enables Parental Control from the Settings screen, a unique password is created and securely stored in the Keychain, using a separate service identifier (org.videolan.vlc-ios.parentalControl).

Whenever the user attempts sensitive actions, such as deleting or renaming media, removing media from plyalists, changing settings, connecting to network streams ou downloading files, the app will prompt for this parental control password if the feature is enabled.

The logic is centralized in the ParentalControlCoordinator class, which is now responsible for:

  • Enabling/disabling parental control through enableParentalControl and disableParentalControl methods
  • Managing the authentication prompt flow for protected actions (authenticate, authorizeIfParentalControlIsEnabled)

All sensitive state and passwords are managed exclusively via the Keychain, eliminating reliance on UserDefaults for secure data.

Internally, Parental Control makes use of the validateSecret and setSecret methods from KeychainCoordinator to manage password creation and validation, while remaining fully isolated from the main Passcode Lock system by maintaining a separate Keychain entry and flow.

Note: The timer-related functionalities are not yet definitive; we are still discussing what role the timer should actually play in the Parental Control flow.

Edited by Arthur Norat

Merge request reports

Loading