Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
main ▾

xtool.git / Documentation / xtool.docc / Installation-Linux.md

Installation-Linux.md4.7 KiBRenderedCodeRaw
1# Installation (Linux/Windows)
2
3Set up xtool for iOS app development on Linux or Windows.
4
5## Overview
6
7This article outlines the steps to install `xtool` and begin developing iOS apps on Linux (or Windows via WSL).
8
9## Prerequisites
10
11### WSL (for Windows users)
12
13If you're on Windows, you can use xtool via [Windows Subsystem for Linux](https://learn.microsoft.com/en-us/windows/wsl/install) (WSL).
14
15Once you install WSL, you'll also need to set up USB passthrough. See Microsoft's instructions on [installing USBIPD](https://learn.microsoft.com/en-us/windows/wsl/connect-usb). Make sure you're able to bind your iOS device to WSL via USB.
16
17> Note:
18>
19> If you encounter `Error: AFCClient.Error.muxError`, follow the steps described in [this issue comment](https://github.com/xtool-org/xtool/issues/19#issuecomment-2898986718) from user rena2019.
20>
21> This relays the device connection from iTunes on Windows, instead of relying on USBIPD.
22
23### Swift
24
25Install the Swift 6.4 toolchain for your Linux distribution from <https://swift.org/install/linux>.
26
27After following the steps there, confirm that Swift is installed correctly:
28
29```bash
30swift --version
31# should say something like:
32# Swift version 6.4 (swift-6.4-RELEASE)
33```
34
35### usbmuxd
36
37xtool relies on [usbmuxd](https://github.com/libimobiledevice/usbmuxd) to talk to your iOS device from Linux.
38
39Your Linux distro probably offers this package, and it may be preinstalled. To check if it is, run
40
41```bash
42usbmuxd --help
43# Usage: usbmuxd [OPTIONS]
44# ...
45```
46
47If instead you get "command not found", you need to install `usbmuxd` yourself. On Ubuntu/Debian, for example, you can do this with
48
49```bash
50sudo apt-get install usbmuxd
51```
52
53> Other useful tools:
54>
55> `usbmuxd` is part of the [libimobiledevice](https://libimobiledevice.org) project. You may want to install other libimobiledevice tools, such as `ideviceinfo`, that offer many ways to interact with your iOS device from the command line. On Ubuntu/Debian, you can run
56>
57> ```bash
58> sudo apt-get install libimobiledevice-utils
59> # The following NEW packages will be installed:
60> # libimobiledevice-utils
61> # 0 upgraded, 1 newly installed
62> ideviceinfo
63> # DeviceName: Kabir's iPhone
64> # SerialNumber: ...
65> # UniqueDeviceID: ...
66> # ...
67> ```
68
69### Xcode.xip
70
71Download **Xcode 27.1** from <https://developer.apple.com/download/all/?q=Xcode>. Note the path where `Xcode.xip` is saved.
72
73> Note:
74>
75> The URL above requires authentication, so make sure to visit it in your browser rather than running `curl`. You'll be asked to log in with your Apple ID and accept the license agreement to download Xcode.
76
77## Installation
78
79### 1. Download xtool
80
81Once you have the prerequisites, download the [latest GitHub Release](https://github.com/xtool-org/xtool/releases/latest) of `xtool.AppImage` for your architecture. Rename it to `xtool` and add it to a location in your `PATH`.
82
83```bash
84curl -fL \
85 "https://github.com/xtool-org/xtool/releases/latest/download/xtool-$(uname -m).AppImage" \
86 -o xtool
87chmod +x xtool
88sudo mv xtool /usr/local/bin/
89```
90
91Confirm that xtool is installed correctly:
92
93```bash
94xtool --help
95# OVERVIEW: Cross-platform Xcode replacement
96# ...
97```
98
99### 2. Configure xtool: log in
100
101Perform one-time setup with
102
103```bash
104xtool setup
105```
106
107You'll be asked to log in:
108
109```
110Select login mode
1110: API Key (requires paid Apple Developer Program membership)
1121: Password (works with any Apple ID but uses private APIs)
113Choice (0-1):
114```
115
116> Choosing a login mode:
117>
118> **API Key:** If you have a paid [Apple Developer Program](https://developer.apple.com/programs/enroll/) membership, this is the recommended option. It relies on the public App Store Connect API. You'll want to follow the [instructions](https://developer.apple.com/documentation/appstoreconnectapi/creating-api-keys-for-app-store-connect-api) to generate a **Team Key** with the **App Manager** role.
119>
120> **Password:** If you aren't enrolled in the paid developer program, you'll want to use password-based authentication. This relies on private Apple APIs to authenticate, so you may want to create a throwaway Apple ID to be extra cautious.
121
122Once you select a login mode, you'll be asked to provide the corresponding credentials (API key or email+password+2FA). Needless to say, *your credentials are only sent to Apple* and nobody else (feel free to build xtool from source and check!)
123
124### 3. Configure xtool: SDK
125
126After you're logged in, you'll be asked to provide the path to the `Xcode.xip` file you downloaded earlier.
127
128```
129Choice (0-1): 0
130...
131Path to Xcode.xip:
132```
133
134Enter the path (for example `~/Downloads/Xcode_27.1.xip`) and hit enter. xtool will extract the Xcode XIP to generate and install an iOS Swift SDK for you.
135
136Confirm that it worked:
137
138```bash
139swift sdk list
140# darwin
141```
142
143## Next steps
144
145You're now ready to use xtool! See <doc:First-app>.