TaskLock is a comprehensive iOS app that combines task management with intelligent app blocking. Built on top of the Foqos blocking engine, it automatically blocks distracting apps when you have incomplete tasks, helping you stay focused and productive.
- Complete Task System: Create, edit, and track tasks with due dates, priorities, categories, and time estimates
- Smart Views: Today view shows overdue and due tasks, Upcoming view groups tasks by day
- Categories: Organize tasks with customizable categories (School, Work, Personal, Health)
- Quick Add: Fast task creation with presets and keyboard shortcuts (Cmd-N)
- Reminders: Local notifications with snooze and complete actions
- Intelligent Blocking: Automatically blocks apps when you have incomplete tasks due today
- Flexible Conditions: Choose from multiple blocking conditions:
- Any task due today
- All tasks due today
- Only high-priority tasks due today
- Active tasks only
- Grace Periods: Configurable delay before blocking activates (0-15 minutes)
- Completion Policies: Unblock when current task is done or when all triggering tasks are complete
- Allowed Apps: Whitelist essential apps (Calendar, Notes, Safari)
- Strict Mode: Prevents disabling blocking during active sessions
- Physical Unlock: NFC and QR code bailout options for emergency access
- Profile Management: Multiple blocking profiles with different settings
- Manual Overrides: Emergency disable with physical verification
- Completion Tracking: Monitor on-time completion rates and streaks
- Focus Time: Track estimated focus time saved through blocking
- Category Breakdown: See productivity patterns by category
- Activity Heatmap: Visual representation of daily task completion
- Data Export: Export tasks, completions, and analytics to CSV
- SwiftUI Interface: Clean, minimal design with SF Symbols
- Dark/Light Mode: Automatic theme switching
- Accessibility: Dynamic Type and VoiceOver support
- Smooth Animations: Polished interactions throughout
- Empty States: Helpful guidance when no tasks exist
TaskLock is built with a modular architecture for maintainability and extensibility:
- TasksKit: CoreData models, CRUD operations, and reminder scheduling
- BlockingKit: FamilyControls/ManagedSettings integration and profile management
- PolicyEngine: Task-conditional blocking logic with comprehensive unit tests
- AnalyticsKit: Data aggregation, chart generation, and CSV export
- AppUI: SwiftUI views, theming, and navigation
- PhysicalUnlock: NFC/QR code integration for emergency access
- AppState: ObservableObject coordinating task changes and blocking policies
- TaskManager: CoreData operations and reminder management
- BlockingManager: Screen Time API integration and profile management
- AnalyticsManager: Statistics calculation and data visualization
- PhysicalUnlockManager: NFC/QR code scanning and validation
- iOS 17.0+
- Xcode 15.0+
- Swift 5.9+
- Apple Developer Account (for Family Controls capability)
Important: The Family Controls capability requires special entitlements from Apple and is only available for App Store distribution or with a special development provisioning profile.
- Open your project in Xcode
- Select your app target
- Go to "Signing & Capabilities"
- Click "+" and add "Family Controls"
- This will add the
com.apple.developer.family-controlsentitlement
Note: For development builds, you may need to:
- Use a development provisioning profile that includes Family Controls
- Contact Apple Developer Support for special entitlements
- Test with TestFlight or App Store distribution
- Set deployment target to iOS 17.0
- Ensure Swift version is 5.9+
- Add required frameworks:
- FamilyControls
- ManagedSettings
- DeviceActivity
- UserNotifications
- CoreNFC (for NFC unlock)
- AVFoundation (for QR code scanning)
- Connect your iOS device
- Select your device as the target
- Build and run (β+R)
- Build the project in Xcode
- Archive the app (Product β Archive)
- Export as .ipa file
- Install via AltStore:
# Install AltStore on your device first # Then use AltStore to install the .ipa file
- Grant Permissions: The app will request Family Controls authorization
- Create Categories: Default categories (School, Work, Personal, Health) are created automatically
- Add Presets: Sample presets are available for quick task creation
- Configure Profiles: Set up blocking profiles in Settings
- Quick Add: Tap the "+" button or use Cmd-N keyboard shortcut
- From Presets: Select from common task templates
- Manual Entry: Fill in title, notes, due date, category, priority, and time estimate
- Go to Settings β Profiles
- Select a Profile to configure:
- Enable "Use task-conditional blocking"
- Choose blocking condition type
- Set grace period (0-15 minutes)
- Configure completion policy
- Add allowed apps to whitelist
- Enable Strict Mode if needed
- Generate QR Code: Settings β Generate Unlock QR Code
- Print or Save: Keep the QR code accessible for emergencies
- NFC Tags: Program NFC tags with unlock codes (format: "UNLOCK-XXXXXXXX")
- View Stats: Check the Stats tab for insights
- Export Data: Settings β Export Tasks/Analytics
- Track Progress: Monitor completion rates and focus time
- Local Data Only: All task data is stored locally on your device
- No Cloud Sync: CoreData with CloudKit is disabled by default
- Secure Unlock: Physical unlock codes are generated locally
- No Tracking: No analytics or data collection beyond local statistics
-
Family Controls Not Working
- Ensure you have a valid Apple Developer account
- Check that the capability is properly configured
- Verify your provisioning profile includes Family Controls
-
Blocking Not Activating
- Check that tasks have due dates set
- Verify the blocking condition is met
- Ensure Family Controls authorization is granted
-
NFC/QR Not Working
- Check device compatibility (NFC requires iPhone 7+)
- Ensure camera permissions are granted
- Verify unlock codes are properly formatted
Enable Demo Mode in Settings to:
- Create sample tasks for testing
- Test blocking behavior without real tasks
- Generate sample analytics data
TaskLock/
βββ TaskLock/ # Main app target
βββ TasksKit/ # CoreData models and CRUD
βββ BlockingKit/ # FamilyControls integration
βββ PolicyEngine/ # Blocking logic and tests
βββ AnalyticsKit/ # Data aggregation and charts
βββ AppUI/ # SwiftUI views and navigation
βββ AppState/ # State management
βββ PhysicalUnlock/ # NFC/QR integration
Run the test suite:
# Unit tests for Policy Engine
xcodebuild test -scheme TaskLock -destination 'platform=iOS Simulator,name=iPhone 15'
# UI tests
xcodebuild test -scheme TaskLockUITests -destination 'platform=iOS Simulator,name=iPhone 15'- New Task Fields: Update CoreData model and TaskManager
- New Blocking Conditions: Extend PolicyEngine and BlockingKit
- New Analytics: Add to AnalyticsManager and chart views
- New UI Views: Add to AppUI module
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
This project is open source. Please check the LICENSE file for details.
For issues and questions:
- Check the troubleshooting section above
- Search existing GitHub issues
- Create a new issue with detailed information
- Built on the foundation of Foqos blocking engine
- Uses Apple's Family Controls framework
- Inspired by productivity and focus methodologies
- Community feedback and contributions
Note: This app requires iOS 17+ and a valid Apple Developer account with Family Controls capability. The blocking functionality is only available on physical devices, not in the iOS Simulator.