Skip to content
This repository has been archived by the owner on Nov 7, 2024. It is now read-only.
/ mobile-device-kit Public archive

📱 A convenient Swift package for communicating with Apple devices.

License

Notifications You must be signed in to change notification settings

lfroms/mobile-device-kit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📱
MobileDeviceKit

A convenient Swift API for interacting with mobile devices on macOS.

GitHub issues GitHub contributors GitHub stars GitHub license Contributions welcome

About

MobileDeviceKit aims to make it easy to discover and interact with mobile devices attached to the system in a Swift application. Internally, MobileDeviceKit interops with Apple's private MobileDevice.framework which is used internally by other Apple programs such as Xcode, Finder, and Apple Configurator.

MobileDeviceKit is incomplete and is a work-in-progress.

Goals

  • Asynchronous APIs by default using modern tools (such as Async Swift and Combine).
  • Full abstraction for any private APIs used internally.
  • Support for interacting with wirelessly-connected devices.
  • Support for launching applications with lldb.

Why shouldn't I use this?

  • You are building a mission-critical app and can't justify debugging issues with private APIs as they change.
  • You need to bundle this package in a universal binary. MobileDeviceKit links against your system's frameworks, which may not be universal.
  • There are probably other more actively maintained projects available (see below).

Why should I use this?

  • You are building a macOS app in Swift and want to be able to easily interact with mobile devices.
  • Your app is non-critical and you've accepted any risks with using private system APIs.
  • You don't want to deal with managing reverse-engineered headers or interacting with MobileDevice's cumbersome C APIs directly.

Can I contribute?

Yes, please! If you have a need for this kind of package, please extend it to suit your needs. All and any contributions are welcome.

The symbol table for MobileDevice.framework can be dumped by running:

nm /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/Current/MobileDevice

If you prefer to reimplement parts of MobileDevice.framework instead without using the private framework, suggestions are welcome.

Alternatives

  • CoreDevice via devicectl

    • CoreDevice is a first party framework that exposes a public, documented command line tool: devicectl.
    • The devicectl utility can be used to perform nearly all development-related tasks on wired and wirelessly-connected devices.
    • Note: CoreDevice only supports devices running iOS 17 or newer.
  • Apple Configurator

    • Apple Configurator is a first party application that provides a public, documented command line tool: cfgutil.
    • You'll probably want to use this for most things. However, it does not support wirelessly connected devices or debugging.

Open source

  • ios-deploy — Popular command line utility with support for launching installed apps.
  • mobile-run — Utility for communicating with iOS devices written in TypeScript.
  • libimobiledevice — Open source library written in C for communicating with iOS devices.
  • mobiledevice — Command line utility.
  • SDMMobileDevice — Drop-in open source replacement for MobileDevice.framework.
  • mobdevim — Command line utility.

License

MobileDeviceKit is released under the GPL-3.0 License unless otherwise noted.

About

📱 A convenient Swift package for communicating with Apple devices.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published