Focus through physical blocking
Foqos allows you to lock distracting apps behind the tap of an NFC tag, helping you stay focused and build better digital habits. Free and open source alternative to Brick, Bloom, Unpluq, Blok and more!
- 🏷️ NFC & QR Blocking: Use NFC tags or QR codes to start and stop blocking sessions
- 🧩 Multiple Strategies: Manual, NFC, QR, NFC + Manual, QR + Manual
- 🔐 Physical Unblock: Optionally require a specific NFC tag or QR code to stop blocking
- 📱 Customizable Profiles: Create multiple blocking profiles for different scenarios (work, study, sleep, etc.)
- 📊 Habit Tracking: Visual tracking of your blocked sessions to monitor your focus habits
- ⏸️ Break Functionality: Take breaks during blocking sessions when needed
- 🔄 Live Activities: Real-time updates on your Lock Screen showing blocking status
- iOS 16.0+
- iPhone with NFC capability
- Screen Time permissions (for app blocking functionality)
- Download Foqos from the App Store
- Grant Screen Time permissions when prompted
- Create your first blocking profile
- Set up your NFC tags and start focusing!
- Purchase NFC tags (NTAG213 or similar recommended)
- In Foqos, create a blocking profile
- Use the NFC writing feature to program your tags
- Place tags in strategic locations (desk, study area, etc.)
- Tap to start/stop blocking sessions
- Xcode 15.0+
- iOS 17.0+ SDK
- Swift 5.9+
- Apple Developer Account (for Screen Time and NFC entitlements)
git clone https://github.com/awaseem/foqos.git
cd foqos
open foqos.xcodeprojfoqos/
├── Foqos/ # Main app target
│ ├── Views/ # SwiftUI views
│ ├── Models/ # Data models
│ │ └── Strategies/ # Blocking strategies
│ ├── Components/ # Reusable UI components
│ ├── Utils/ # Utility functions
│ └── Intents/ # App Intents & Shortcuts
├── FoqosWidget/ # Widget extension
└── FoqosDeviceMonitor/ # Device monitoring extension
- SwiftUI - Modern declarative UI framework
- SwiftData - Local data persistence
- Family Controls - App blocking functionality
- Core NFC - NFC tag reading/writing
- CodeScanner - QR code scanning
- BackgroundTasks - Background processing
- Live Activities - Dynamic Island and Lock Screen updates
- WidgetKit - Home Screen widgets
- App Intents - Shortcuts and automation support
All strategies live under Foqos/Models/Strategies/ and are orchestrated via Foqos/Utils/StrategyManager.swift.
-
NFC Tags (
NFCBlockingStrategy)- Start: scan any NFC tag to start the selected profile
- Stop: scan the same tag to stop the session
- Physical Unblock (optional): set
physicalUnblockNFCTagIdon a profile to require that exact tag to stop (ignores the session’s start tag)
-
QR Codes (
QRCodeBlockingStrategy)- Start: scan any QR code to start the selected profile
- Stop: scan the same QR code to stop the session
- Physical Unblock (optional): set
physicalUnblockQRCodeIdon a profile to require that exact code to stop (ignores the session’s start code) - The app can display/share a QR representing the profile’s deep link using
QRCodeView
-
Manual (
ManualBlockingStrategy)- Start/Stop entirely from within the app (no external tag/code required)
-
NFC + Manual (
NFCManualBlockingStrategy)- Start: manually from within the app
- Stop: scan any NFC tag (restricted to
physicalUnblockNFCTagIdif set)
-
QR + Manual (
QRManualBlockingStrategy)- Start: manually from within the app
- Stop: scan any QR code (restricted to
physicalUnblockQRCodeIdif set)
- Each profile exposes a deep link via
BlockedProfiles.getProfileDeepLink(profile)in the form:https://foqos.app/profile/<PROFILE_UUID>
- Scanning a QR that encodes this deep link will toggle the profile: if inactive it starts, if active it stops. This works even if the app isn’t already open (it will be launched via the link).
We welcome contributions! Here's how you can help:
- Fork the repository
- Make your changes and test as much as you can
- Commit your changes (
git commit -m 'Add amazing feature') - Open a Pull Request
- Follow Swift coding conventions
- Update documentation as needed
- Test on multiple iOS versions when possible
Having trouble? We're here to help!
- Bug Reports: Open an issue with detailed steps to reproduce
- Feature Requests: Share your ideas via GitHub Issues
- Questions: Use GitHub Discussions for general questions
When reporting issues, please include:
- iOS version
- Device model
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
This project is licensed under the MIT License - see the LICENSE file for details.
- App Store
- GitHub Issues
- Support the Project (via in-app purchases or here)
Made with ❤️ by Ali Waseem
