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, rename and delete files directly on the device.
- Progress Tracking: Real-time transfer progress bars and status indicators.
- Safe and secure: No ADB or USB debugging required.
- Localization: Multilingual support via
Localizable.xcstrings.
| File menu with Keyboard Shortcuts | Go menu with Keyboard Shortcuts |
|---|---|
![]() |
![]() |
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)
- Xcode 15.0+
- macOS 12.0+
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.
-
Drag-and-Drop
-
Automatic device connect detection
-
Transfer progress bar and status indicators
-
Multi selections and export
-
"Go" and "File" menu
-
Favorites
-
Finder-like quick look preview (press spacebar)
-
File list font size adjustment
-
Paste to import
-
Multiple device connections (v1.1)
-
Cancel a transfer (v1.1)
I got "OpenSession after reset: LIBUSB_ERROR_NOT_FOUND"
This could be due to other software occupying MTP sessions or a device connection issue. Please ensure software like Preview, Image Capture, or Android File Transfer is not running. For Android File Transfer, even if it's not running in the foreground, there is an Android File Transfer Agent in the system background to detect USB MTP device connections in real time and automatically launch the main app. You can exit Android File Transfer Agent in Activity Monitor. After that, please reconnect or restart your device.
macOS cannot verify this app?
This is because the app was not released in the way Apple prefers. Apple requires developers to pay $99 annually for a so-called "security signature". Please go to System Settings > Privacy & Security, scroll down and allow the app to run.
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.
Contributing: SwiftMTP is always looking for contributions. Just simply fork this repo and make pull requests. You can also improve the translation or add your new language freely.
Support project: ☕️ Buy Me a Coffee


