DefaultApp is a native macOS application designed to easily manage default program associations for file extensions. It provides a clean, modern, and highly interactive user interface to view and modify which application opens specific file types globally across the system.
- Liquid Glass UI: Designed with a high-fidelity "liquid glass" visual style, featuring floating control capsules, subtle gradient background blurs, specular highlights, and 3D-like borders.
- Global Association Management: Query and update default applications for common and custom file extensions globally using macOS system APIs (
NSWorkspaceand Uniform Type Identifiers). - Intelligent App Scanner: Scans installed applications on your Mac, parses their
Info.plistdeclarations (UTExportedTypeDeclarationsandUTImportedTypeDeclarations), and automatically extracts supported file extensions. - Custom Extensions: Allows users to manually add and manage custom file extensions that are not pre-defined.
- Polished Interactive Experience:
- Custom Hand Cursor: Interactive elements (list rows, buttons, segmented pickers) display a pointing hand cursor on hover, which remains stable during clicks and selections.
- Smart Focus Dismissal: Clicking outside the search bar or on empty background areas automatically dismisses keyboard/search focus.
- Unified Title Bar: Integrated controls and traffic lights blend seamlessly into the window chrome.
- Single-Window Lifecycle: Operates as a single-window utility that automatically terminates when its main window is closed.
- SwiftUI: Modern declarative UI framework.
- AppKit: For advanced system integration, including
NSWorkspacefor default app configuration,UTTypefor file type handling, and custom cursor/focus management. - Swift 5.9+ / Observation: Utilizes the modern
@Observableframework for reactive data binding. - Target Platform: macOS 14.0+ (takes advantage of macOS 15.0+ native
pointerStyleAPI with reliable AppKit fallbacks for older versions).
DefaultApp/
├── DefaultApp.swift # Application entry point & lifecycle delegate
├── DefaultApp.entitlements # App security configuration (Sandbox disabled)
├── Models/
│ ├── FileTypeItem.swift # Model representing a file extension and its UTI
│ ├── FileTypeSource.swift # Enum representing common vs custom extensions
│ └── CommonExtensions.swift # Pre-defined list of common macOS file extensions
├── Services/
│ ├── DefaultAppService.swift # NSWorkspace-backed service to get/set default apps
│ ├── FileTypeCatalog.swift # Catalog manager for scanning and saving extensions
│ └── InstalledAppExtensionScanner.swift # Scanner to extract supported UTIs from installed apps
├── Views/
│ ├── ContentView.swift # Root split-view container
│ ├── FileTypeListView.swift # Sidebar list with floating Liquid Glass controls
│ ├── AppPickerView.swift # Detail panel for choosing default applications
│ ├── AddExtensionSheet.swift # Sheet to add custom file extensions
│ ├── LiquidGlassStyle.swift # View modifiers for glass panels and hand cursors
│ ├── SidebarToggle.swift # Helper for programmatic sidebar toggling
│ └── FileTypeListTab.swift # Tab enum for common vs custom extensions
└── Assets.xcassets/ # App icon and accent color assets
- macOS 14.0 or later
- Xcode 15.0 or later
- Clone this repository to your local machine.
- Open
DefaultApp.xcodeprojin Xcode. - Select the
DefaultAppscheme and a Mac run destination. - Press
Cmd + Rto build and run the application.
A build script is provided in the Scripts directory to compile the application and package it into a .dmg file.
To build an unsigned DMG for local testing or sharing:
./Scripts/build-dmg.shThe output DMG will be generated at build/DefaultApp.dmg.
Since the local build is unsigned and unnotarized, macOS Gatekeeper will block it by default with warnings like "App is damaged" or "Developer cannot be verified".
Please follow these steps to install and run the application:
-
Install:
- Double-click
DefaultApp.dmg. - Drag
DefaultApp.appinto the/Applicationsfolder.
- Double-click
-
Bypass Security Check (Fastest - One-Line Terminal Command):
- Open Terminal.app.
- Run the following command (enter your Mac password if prompted):
xattr -cr /Applications/DefaultApp.app
- Now you can double-click and open
DefaultAppnormally from your Applications or Launchpad!
-
Alternative Bypass (Manual via System Settings):
- Double-click the app in
/Applications. When the warning popup appears, click Cancel. - Open System Settings -> Privacy & Security.
- Scroll down to the Security section.
- You will see a message: "DefaultApp was blocked from use because it is not from an identified developer."
- Click Open Anyway and enter your Mac credentials.
- Click Open on the final confirmation dialog.
- Double-click the app in
To build a signed and notarized DMG for distribution, run the script with the --release flag and provide your Apple Developer credentials:
DEVELOPMENT_TEAM=YOUR_TEAM_ID \
SIGNING_IDENTITY="Developer ID Application: Your Name (YOUR_TEAM_ID)" \
NOTARY_PROFILE=your-notary-profile-name \
./Scripts/build-dmg.sh --releaseThis project is licensed under the MIT License. See the LICENSE file for details.