SwiftMTP
Introduction: A modern MTP device management tool for macOS.
Tags:
SwiftMTP
SwiftMTP is a light-weight, modern, Swift-based utility for interacting with MTP (Media Transfer Protocol) devices on macOS. It allows users to browse, manage, and transfer files between a Mac and external devices like Android phones.
Inspired by OpenMTP, SwiftMTP uses the enhanced backend to provide a consistently high-performance transfer experience while maintaining a compact footprint.
- Device Management: Easily connect/disconnect MTP devices and select specific storage devices.
- File Browsing: Deeply navigate through device directories with a native macOS feel with Quick Look preview supported.
- Bi-directional Transfer: Import and export files with support for Drag-and-Drop.
- File Operations: Create new folders and delete files directly on the device.
- Progress Tracking: Real-time transfer progress bars and status indicators.
- Localization: Multilingual support via
Localizable.xcstrings.
Screenshot

Architecture
The project is structured to bridge high-level Swift with low-level MTP kernel interactions:
SwiftMTP/
├──SwiftMTP/ # Main App Source
│ ├── SwiftMTPApp.swift # Entry point
│ ├── Views/ # SwiftUI UI Layer
│ ├── Models/ # Data models
│ └── Services/ # KalamMTPManager (Connection & Transfer logic)
├──KalamShim/ # C shim bridging Swift and the MTP kernel
├──ffi/ # Kalam backend source
├──CKalam/ # Module map for C headers
└──lib/ # Runtime dependencies (kalam.dylib, libusb.dylib)
Getting Started
Download
Build
Prerequisites
- Xcode 15.0+
- macOS 12.0+
Build & Run
Please build Kalam backend first. Refer toPre-compiled dylibs have been added. You can also compile them by yourself.ffi/kalam/native/README.md. This step will build necessary dynamic libraries (kalam.dylib&libusb.dylib) and will place them underlib.- Open
SwiftMTP.xcodeprojin Xcode. - Select your target platform (macOS).
- Press Run.
Realized
- Drag-and-Drop
- Automatic device connect detection
- Transfer progress bar and status indicators
- Multi selections and export
- "Go" menu
- Favorites
- Finder-like quick look preview (press spacebar)
- File list font size adjustment
- Paste to import
To do
- Multiple connections at same time
License
About AI: AI assistance involved; each code segment has undergone manual review and testing.
Need help? If you encounter any issues, please open an Issue.
Support project: ☕️ Buy Me a Coffee
