Skip to content

Mirxa27/AppLocker

Repository files navigation

AppLocker for macOS

A macOS application that lets you lock apps behind a passcode or Touch ID/Face ID authentication.

Features

Core Security

  • Passcode Protection - Securely lock apps with a 4+ character passcode (PBKDF2-HMAC-SHA256, 200k iterations, per-device salt; legacy installs auto-upgrade from v1 hashing, stored in Keychain)
  • Biometric Authentication - Unlock with Touch ID or Face ID (if available)
  • App Blocking Engine - Prevents locked apps from opening without authentication (200ms polling + workspace observers)
  • Escalating Lockout - Progressive time-based lockout after failed passcode attempts (30s to 1 hour)
  • Intruder Detection - Captures photos after 2+ failed unlock attempts

Scheduling & Productivity

  • Schedule-Based Locking - Set per-app time windows that either block access or allow access only during selected hours
  • Smart Schedule Templates - 8 pre-built templates for common patterns (Work Hours, Evening Wind Down, Study Time, etc.)
  • Focus Mode - Pomodoro-style distraction-free sessions with profiles (Deep Work, Study, Meeting)
  • App Usage Quotas - Daily time limits for locked apps with warnings and optional auto-termination

Organization & Management

  • App Categories - Organize locked apps into groups (Social Media, Games, etc.) for batch management
  • Configurable Unlock Duration - Choose how long temporary unlocks last (30s to 1 hour)
  • Auto-Lock on Sleep - Automatically re-locks all apps when screen sleeps or lid closes
  • Change Passcode - Update your security passcode from Settings
  • Export/Import Config - Backup and restore your locked apps, categories, and settings
  • Full Reset - Option to wipe all data and start fresh from Settings

Security Tools

  • Secure Vault - AES-256-GCM encrypted file storage with drag-and-drop interface
  • File Locker - In-place file encryption with .aplk format
  • Clipboard Guard - Auto-clear clipboard after configurable delay
  • Screen Privacy - Hide window from screen recordings, auto-lock on recording detection
  • Network Monitor - Real-time connection monitoring for locked apps
  • Secure Notes - Encrypted note-taking with AES-256-GCM

Monitoring & Alerts

  • Usage Statistics - Track block counts, unlock counts, and failed attempts per app with time-period filtering
  • Persistent Activity Log - Logs survive app restarts (up to 500 entries)
  • Local Notifications - Get notified when locked apps are accessed, with action buttons
  • Cross-Device Alerts - Sync security alerts via iCloud to your other Apple devices
  • Menu Bar Integration - Quick access from the macOS status bar

iOS Companion

  • Remote Control - Lock/unlock apps from your iPhone/iPad
  • Dashboard - View Mac device status and recent blocks
  • Secure Notes Sync - Read encrypted notes synced from Mac
  • Alerts History - View all security events from your Mac

How to Use

First Time Setup

  1. Launch AppLocker
  2. Set up your security passcode (minimum 4 characters)
  3. Grant Accessibility permissions when prompted (required for app blocking)

Locking Apps

  1. Open AppLocker and authenticate
  2. Go to the "Add Apps" tab
  3. Browse installed apps or currently running apps
  4. Click "Lock" on any app you want to protect
  5. Enable monitoring using the toggle in the header

Unlocking Apps

When you try to open a locked app:

  1. AppLocker will intercept and terminate it
  2. An unlock dialog appears
  3. Enter your passcode OR use Touch ID/Face ID
  4. The app will be temporarily unlocked for the configured duration (default: 5 minutes)

Schedules

  1. Go to the "Locked Apps" tab
  2. Click the clock icon next to any locked app
  3. Enable scheduling and set the active hours and days
  4. The app will only be blocked during the scheduled time windows

Usage Statistics

The "Stats" tab shows:

  • Total blocks, unlocks, and failed attempts
  • Per-app breakdown with last-blocked timestamps
  • Filterable by time period (today, this week, this month, all time)

Settings

  • Security: Change passcode, auto-lock on sleep, lockout protection
  • Unlock Duration: Configure how long temporary unlocks last
  • Notifications: Toggle notifications and cross-device alerts
  • Backup & Restore: Export/import your configuration
  • Danger Zone: Reset all data

Security Notes

  • Passcodes are derived with PBKDF2 (200k iterations) and a random 32-byte salt; older data may verify once with SHA-256 (v1) and then upgrade to v2 on successful login
  • Credentials stored in macOS Keychain with kSecAttrAccessibleWhenUnlockedThisDeviceOnly (see code for exact accessibility flags per item)
  • No network connectivity required (except for cross-device iCloud sync)
  • Escalating lockout: 30s at 5 failures, 2min at 8, 5min at 10, 15min at 15, 1hr at 20
  • All data stays on your device

Technical Details

  • Built with Swift 5.9+ and SwiftUI
  • Uses LocalAuthentication framework for biometrics
  • Uses CryptoKit and CommonCrypto (PBKDF2, AES-GCM, HMAC) for cryptography
  • Architecture overview: docs/ARCHITECTURE.md
  • Requires macOS 13.0 (Ventura) or later
  • Needs Accessibility permissions for app monitoring
  • Xcode project is generated from project.yml with XcodeGen
  • SwiftPM test target covers schedule and crypto logic

Download

Get the latest release from GitHub Releases.

  1. Download AppLocker-X.X.dmg from the latest release
  2. Open the DMG and drag AppLocker to your Applications folder
  3. Launch AppLocker and follow the setup process

Build from Source

Quick Build (Using Makefile)

cd ~/AppLocker
make generate-project
make build-macos
make test
make release
# or export App Store-ready artifacts for both platforms
make publish-appstore

Manual Build

cd ~/AppLocker
xcodegen generate --spec project.yml
xcodebuild -project AppLocker.xcodeproj -scheme AppLocker -configuration Debug -destination 'platform=macOS' CODE_SIGNING_ALLOWED=NO build
swift test --package-path .

Build the iOS companion with:

xcodebuild -project AppLocker.xcodeproj -target AppLockerCompanion -configuration Debug -sdk iphonesimulator CODE_SIGNING_ALLOWED=NO build

If the local Xcode install does not have a compatible simulator runtime for the active iPhone simulator SDK, install the matching iOS platform/runtime from Xcode Components before running the iOS build.

Creating a Release

See RELEASE.md for detailed release instructions.

Quick release:

make test
./scripts/build-release.sh
# or, for a Developer ID signed build:
./scripts/release-signed.sh
# or, for App Store export artifacts:
./scripts/publish-appstore.sh

Important

Grant Accessibility Permissions: The app needs Accessibility access to monitor and block other applications. You'll be prompted on first launch. Go to System Settings > Privacy & Security > Accessibility to manage.

Passcode Recovery: You can now change your passcode from Settings (requires current passcode). If you forget your passcode completely, use the "Reset Everything" option in Settings > Danger Zone, which will wipe all data.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors