SwiftMTP

Project Url: Neighbor-Z/SwiftMTP
Introduction: A modern MTP device management tool for macOS.
More: Author   ReportBugs   OfficialWebsite   
Tags:

SwiftMTP

Website · Releases

Swift 5.9+Platform: macOS 12.0+License: GPL

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

Main UI


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

Release

Build

Prerequisites

  • Xcode 15.0+
  • macOS 12.0+

Build & Run

  1. Please build Kalam backend first. Refer to ffi/kalam/native/README.md. This step will build necessary dynamic libraries (kalam.dylib & libusb.dylib) and will place them under lib. Pre-compiled dylibs have been added. You can also compile them by yourself.
  2. Open SwiftMTP.xcodeproj in Xcode.
  3. Select your target platform (macOS).
  4. 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

GPL


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

Apps
About Me
GitHub: Trinea
Facebook: Dev Tools