xtool: Cross-Platform Xcode Replacement for iOS Apps
What xtool is
xtool is a cross-platform replacement for Xcode's build and deploy workflow. It lets you build an iOS app from a Swift Package Manager (SwiftPM) project, sign it and install it on a physical iPhone or iPad from Linux, from Windows through WSL, or from macOS. Its README sums up the scope in three points: build a SwiftPM package into an iOS app, sign and install iOS apps, and interact with Apple Developer Services programmatically.
The problem it addresses is familiar to anyone who has wanted to write an iOS app without a Mac: Apple's toolchain assumes Xcode, which only runs on macOS. xtool replicates the parts of Xcode needed to go from source code to an app running on a device, using what the project calls open standards: SwiftPM for the package structure, the Build Server Protocol for editor integration, and a Darwin Swift SDK generated from Apple's own Xcode download.
It is aimed at Swift developers on Linux or Windows, people who prefer VS Code or another editor to Xcode, and macOS developers who want a declarative, SwiftPM-driven project instead of an .xcodeproj. The project also exposes its internals as a Swift library, XKit, for tools that need to talk to Apple Developer Services or iOS devices.
How xtool works
An xtool project is a regular Swift package with a few extra files. Running xtool new generates Package.swift, an xtool.yml file, a .gitignore, a .bsp/xtool.json file and starter SwiftUI sources. The tutorial explains the two additions: xtool.yml describes how to bundle the Swift library into an iOS app and must at least provide a bundle ID, which defaults to com.example.<PackageName>; .bsp/xtool.json tells your IDE to ask xtool for build information over the Build Server Protocol, which enables syntax highlighting and documentation lookup through SourceKit-LSP.
On Linux, xtool needs an iOS SDK. During setup you point it at an Xcode.xip file downloaded from Apple, and xtool extracts it to generate and install a Darwin Swift SDK, after which swift sdk list shows a darwin SDK. On macOS it uses the SDK from an installed Xcode, though not Xcode's build system. Device communication on Linux goes through usbmuxd from the libimobiledevice project.
When you run xtool dev, SwiftPM builds the app, then xtool waits for a connected device, pairs with it, connects to Apple Developer Services, registers the device with your Apple ID, generates a certificate, App ID and provisioning profile, signs the app and installs it. The first build can take a few minutes because SwiftPM builds the Swift modules for the iOS SDK; the docs say later runs are much faster because those modules are cached globally.
Key features
- SwiftPM-based iOS builds: build a Swift package into an iOS app without an Xcode project file.
- Signing and installation: provisioning, signing and installation to a USB-connected device in one
xtool devcommand. - Cross-platform: Linux, Windows through WSL with USB passthrough, and macOS.
- Two login modes: an App Store Connect API key for paid Apple Developer Program members, or Apple ID password login that works with any Apple ID.
- Device commands: list devices, install an
.ipa, uninstall and launch installed apps from the command line. - Developer Services access: the
dssubcommand interacts with Apple Developer Services directly. - Editor integration: Build Server Protocol support so SourceKit-LSP in VS Code and other editors gets build context.
- App extensions: a guide shows adding a Widget extension by declaring an extra product and listing it under
extensionsinxtool.ymlwith its ownInfo.plist. - XKit library: the same functionality as a SwiftPM dependency for your own tools.
Getting started with xtool
On Linux, the installation guide asks for the Swift 6.4 toolchain from swift.org, usbmuxd and a downloaded Xcode 27 Xcode.xip. If usbmuxd is missing on Ubuntu or Debian:
sudo apt-get install usbmuxdThen download the AppImage release for your architecture and put it on your PATH:
curl -fL \
"https://github.com/xtool-org/xtool/releases/latest/download/xtool-$(uname -m).AppImage" \
-o xtool
chmod +x xtool
sudo mv xtool /usr/local/bin/On macOS, with Homebrew:
brew install xtool-org/tap/xtoolAlternatively, download xtool.app from the latest GitHub release. On every platform, one-time setup is:
xtool setupSetup asks you to choose a login mode and, on Linux, for the path to Xcode.xip. From there the tutorial creates and runs a project:
xtool new HelloInside the new package directory, xtool dev builds, signs and installs the app. On the first run you may need to tap Trust on the device, enable Developer Mode, and trust your developer certificate under Settings, General, VPN and Device Management before the app launches. To use the library instead of the CLI, the README gives the SwiftPM declarations:
// package dependency:
.package(url: "https://github.com/xtool-org/xtool", .upToNextMinor(from: "1.2.0"))
// target dependency:
.product(name: "XKit", package: "xtool")Use cases
- iOS development on Linux or Windows: write and test SwiftUI apps on a real device without owning a Mac.
- Editor choice: develop in VS Code with the Swift extension, including over the WSL remote on Windows.
- Declarative projects on macOS: keep an iOS app as a plain Swift package that is easier to diff and review than an Xcode project.
- Automation: script device installs or Developer Services tasks from the CLI, or embed XKit in internal tools.
- Personal and hobby apps: sideload your own apps onto your own devices with a free Apple ID.
How xtool compares
The obvious comparison is Xcode itself. xtool does not try to replace Xcode's editor, Interface Builder or simulators; it replaces the build, sign and deploy loop and leaves editing to whatever editor speaks SourceKit-LSP. On macOS it still depends on Xcode being installed for the SDK and toolchain, and on Linux it depends on an Xcode download for the SDK, and the guide notes that downloading Xcode requires signing in with an Apple ID and accepting Apple's license agreement.
Compared with Xcode projects, the main trade-off is coverage. The app extensions guide notes that xtool supports the older Foundation Extensions model and that ExtensionKit support is planned but not available yet, and the docs focus on running on a USB-connected physical device.
Things to know before adopting xtool
- License: MIT.
- Password login uses private APIs: the docs say password-based authentication relies on private Apple APIs and suggest a throwaway Apple ID to be cautious. The API key mode uses the public App Store Connect API and needs a paid membership plus a Team Key with the App Manager role.
- Credentials: the docs state credentials are only sent to Apple and invite you to build from source to verify.
- Prerequisites are specific: the Linux guide currently names Swift 6.4 and Xcode 27; check the installation page for the versions your release expects.
- Windows needs USB passthrough: WSL users set up USBIPD, and the docs link a workaround for a known
AFCClient.Error.muxError. - Manual updates: a manually installed macOS app does not auto-update; the docs point to an open issue about Sparkle support.
- Young project: the repository was created in November 2024.
Project activity
As of October 2026 the repository has about 10,100 stars. It was created in November 2024, is written in Swift and is licensed under MIT, with commits landing in October 2026. The source is at github.com/xtool-org/xtool, and the installation guides and first-app tutorial are at xtool.sh.
Enjoying this project?
Discover more amazing open-source projects on TechLogHub. We curate the best developer tools and projects.
Repository:https://github.com/xtool-org/xtool
GitHub - xtool-org/xtool: xtool: Cross-Platform Xcode Replacement for iOS Apps
xtool builds SwiftPM packages into iOS apps, then signs and installs them on a connected iPhone from Linux, Windows via WSL or macOS. It also talks to Apple Dev...
github - xtool-org/xtool
Related Projects
Maintain xtool: Cross-Platform Xcode Replacement for iOS Apps? Add the badge to your README
Show that the project is featured on TechLogHub and send readers to this write-up.
[](https://techloghub.com/open-source/xtool-xcode-replacement?utm_source=techloghub_badge&utm_medium=referral&utm_campaign=readme)
