omarchy-apple-dev README

README проекта с github.com/joshuaswarren/omarchy-apple-dev. Одним файлом markdown: README.md.

Build and deploy iOS apps on Omarchy Linux (Apple Silicon and x86_64)

The projects

Part of the Omarchy on Apple Silicon ecosystem:

SwiftUI and Flutter apps built on Omarchy Linux and installed on a physical iPhone: over USB, or over your tailnet on iOS 27. No Xcode and no macOS in the loop. A free Apple ID covers device installs; a paid developer account adds TestFlight and the App Store.

What was verified, and when

Date What ran Evidence
2026-10-03 Fresh-user install on x86_64 Arch: Swift 6.4.0, xtool 1.20.1, Xcode 27.0 SDK receipt
2026-10-23 xtool 1.23.0 with made-up credentials: password auth changed from -80045 to Apple's invalid-credential -20970. No real-Apple-ID sign-in, SDK build, device install or LLDB loop on this version receipt
2026-10-25 Fresh x86_64 Arch install through the SDK-download step, plus interrupted-xtool-install repair with Swift 6.4.1. No SDK build, device install or LLDB loop CHANGELOG.md, xtool installs again on a fresh machine
2026-09-09 Device install and the LLDB loop on an M1, with Swift 6.3.3, xtool 1.19.0 and the iOS 26.5 SDK. Not re-run on the 6.4 set Getting started
2026-09-15 x86_64 flow confirmed by a community report (Jon Kinney); the same flow runs a real client project on a Framework Desktop with an iPhone 16 none
Tool Version Source
Swift 6.4.1 in the latest fresh-install check AUR swift-bin
xtool main (a2875dd, with xtool-org/xtool#375, #430, #422 and #432) + the 11 fork commits (pin 7cc56c3, fork tag omarchy-main-pin) built from source by the installer
pymobiledevice3 latest from PyPI at install time venv
cryptography 42 or later; a dependency of pymobiledevice3, in the same venv. tools/asc.py identity and test-identity stop with a message naming the version if it is older venv
LLDB bundled with the installed Swift toolchain swift-bin
iOS SDK iPhoneOS 27.0 Xcode 27.0 (full mode); in no-Xcode mode, link stubs cut from a connected iPhone or Apple's public iOS update

Two install modes

./install-toolchain.sh asks which mode to use when it runs in a terminal. Pass --mode full or --mode no-xcode to skip the question; the choice is remembered in ~/.config/omarchy-apple-dev/mode. Without a terminal and without a choice it uses full.

full (Xcode download) no Xcode download (experimental)
Languages Swift, SwiftUI, Objective-C, C, C++ Objective-C, C and Swift (standard library, async/await, Foundation), plus a small SwiftUI subset (App, WindowGroup, Text, VStack, Button, @State)
Flutter release builds, any plugin whose source builds release builds with Objective-C plugins and the Swift plugins shared_preferences and url_launcher
System frameworks everything in the Xcode SDK Foundation, UIKit, CoreGraphics, QuartzCore, CoreFoundation, UserNotifications, libc; a short list, growing
Extensions, widgets, macOS apps yes not yet
TestFlight and App Store yes, with a paid account TestFlight upload of Flutter apps, with a paid account (sdk-free/ship.sh --upload); App Store review not tried
Needs the Xcode archive from Apple (about 3 GB of it is used) an iPhone only to run the apps; setup reads a connected iPhone or Apple's public iOS update download and uses about 7 GB of temporary disk

What has run on an iPhone and what only builds (no-Xcode mode): docs/TEST-MATRIX.md. Mode internals: sdk-free/README.md.

Requirements

Version matching matters. The SDK must come from an Xcode whose Swift matches the installed swift-bin: Xcode 27 for swift-bin 6.4, Xcode 26 for 6.3. The installer prints the matching Xcode when it stops at the SDK step.

Install

New here? GETTING-STARTED.md walks from the Omarchy Install menu to a TestFlight upload. On Omarchy, Install > Development > iOS runs these steps for you.

git clone https://github.com/joshuaswarren/omarchy-apple-dev
cd omarchy-apple-dev
./install-toolchain.sh

The script installs Swift and builds xtool, then stops at the SDK step and names the Xcode to download. Download that .xip from https://developer.apple.com/download/all/?q=Xcode and re-run:

XCODE_XIP=/path/to/Xcode.xip ./install-toolchain.sh

swift sdk list should print darwin when the SDK is registered. Re-run the installer after toolchain changes: it checks the SDK stamp, not just that name.

Optional Tomacco frontend

Tomacco is a separate application. This repository does not download, bundle, install, or start it. The optional registration accepts the evaluated Tomacco 1.0.0 x86_64 binaries from source commit 84f877eb34fb202384010afb5f54c0da7fea892f; other builds fail the hash check. Keep its dependencies, license notices, and corresponding source available under its own installation procedure.

After installing that version separately, run these commands from this checkout:

python3 tools/tomacco-frontend.py enable "$HOME/.local/lib/tomacco"
python3 tools/tomacco-frontend.py status

This adds iOS development (Tomacco) to the application menu. It does not change Install > Development > iOS or either toolchain install mode. The menu command checks both binary hashes again before launch. It preserves your HOME and XDG directories, and uses the PATH from registration. Keep this checkout in place; register again if you move it.

Registration writes each file through an exclusive temporary file in the same directory. It sets permissions before publication and uses atomic replacement. If publication stops between config and menu updates, rerun enable or use disable. Recovery accepts the original menu file only while its identity, timestamps, size and hash remain unchanged. Restoring old bytes after replacement does not restore ownership. Unrelated or edited entries stop the operation.

Use Tomacco's ordinary xtool project workflow with the existing toolchain and sign-in. Existing explicit Tomacco executable settings still take precedence. Do not use ios.toolkit_install: that separate upstream adapter creates a private toolkit and HOME. Its Flutter, Xcode-import and store adapters are not connected to this registration. No device, SDK build, sign-in, or desktop rendering has been qualified by the registration tests.

To remove only this registration:

python3 tools/tomacco-frontend.py disable

Removal preserves Tomacco, its data, the toolchain, SDKs, and credentials. It refuses to overwrite or remove a desktop entry you changed. This option supplies no Apple SDK, firmware, emulator, or Apple-terms acceptance. Optional registration does not establish permission to use or distribute Apple materials. No emulator-engine distribution is approved here.

First app

xtool new HelloOmarchy
cd HelloOmarchy
xtool dev run

xtool dev build alone produces xtool/HelloOmarchy.app (arm64 Mach-O). An existing Xcode project: tools/xcodeproj2xtool.py App.xcodeproj writes an xtool adapter next to it, with SourceKit-LSP support. It takes the settings of the Release configuration; --configuration Debug takes another one's (bundle ID, Info.plist values, compilation conditions). A dependency whose manifest tests the build machine (RxSwift drops RxCocoa when it is not a Mac) gets answered as on a Mac by tools/host-manifests.py omarchy-xtool. See GETTING-STARTED.md, step 2.

Run on your iPhone

Plug the iPhone in, tap Trust when prompted, then, from the project directory:

./device-run.sh

device-run.sh pairs, installs and launches the app. --lldb attaches LLDB without root. With --rsd or --over-tailnet, --console [SECONDS] streams the app's own output and --symbolicate pulls and resolves crash reports (docs/CRASH-SYMBOLICATION.md).

Use USB for initial pairing. The Linux wireless RemotePairing path is blocked on iOS 26. On iOS 27, pair once over USB and copy the pairing record to the host on your tailnet. With Wi-Fi and Tailscale connected on the phone, that host can install, launch, screenshot and read logs without a cable (docs/OVER-TAILNET.md, measured 2026-10-10).

Pairing records are device credentials. Keep them private and copy them only to hosts you trust.

Running Omarchy in the tryomarchy.com Windows VM? Do the Windows VM iPhone USB setup first. Bare-metal installs do not need it.

Kotlin Multiplatform apps

Gradle skips the iOS framework of a Kotlin Multiplatform project on Linux; kmp/build-framework.sh links it from the klibs Gradle builds, and the Swift app around it builds as an xtool package with the framework as a binary target. Verified on x86_64 with a Compose Multiplatform app. Details: kmp/README.md.

Flutter apps

Verified on x86_64 with Flutter 3.47.6 (receipt). Release mode, arm64 device builds only: no debug, hot reload or simulator. Plugins must ship a Package.swift. aarch64 hosts are untested. Details: flutter/README.md.

./install-toolchain.sh                    # once, as for any app in this repo
sudo pacman -S --needed llvm rsync        # the two tools the Flutter build calls
flutter/setup.sh                          # once per Flutter version: ~7 GB, 5-12 min

flutter create --platforms ios counter    # or use your own Flutter app
flutter/build.sh counter                  # -> build/ios-linux/Runner.ipa (unsigned), 29 s for the template

flutter/build.sh --install counter        # free Apple ID route: xtool signs and installs

For a signed development .ipa for a specific device: tools/provision-dev.py --bundle-id <id> then tools/sign-dev.sh <App>.app out.ipa. For the App Store and TestFlight: flutter/ship.sh --upload counter (same key variables as ship.sh --upload below).

Flutter support is the work of dl-alexandre (@agrxculture). Thank you for the build pipeline (#7), the Linux ibtool for Flutter's storyboards (#8) and plugin package support (#9).

Ship to TestFlight and the App Store

Once: create an App Store Connect API team key (role App Manager with access to Certificates, Identifiers & Profiles) and keep the .p8 private; create the app record in App Store Connect (Apps > + > New App; the API cannot create apps). Then, from an xtool project directory:

ASC_KEY_PATH=/path/to/AuthKey_XXXXXXXXXX.p8 ASC_ISSUER_ID=<issuer-uuid> ASC_KEY_ID=XXXXXXXXXX \
  ~/omarchy-apple-dev/ship.sh --upload

ship.sh builds a release .app, compiles the app icon, registers the bundle id, creates an Apple Distribution certificate (the private key stays in ~/.config/omarchy-apple-dev/distribution/) and an App Store profile, signs with rcodesign, validates the .ipa offline (any FAIL stops it), uploads and prints Apple's processing result. It never submits a build for review.

The console steps that remain after the upload are available as an opt-in command, tools/asc.py publish IPA|APP NOTES_JSON (same key variables; ship.sh itself stays as it is). Point NOTES_JSON at a Play-style release_notes.json ([{"language": "en-US", "text": ...}], the same file Google Play takes): publish finds the App Store version for the bundle's version string (creates it when missing), attaches the uploaded build once TestFlight shows it VALID and fills "What's New" in every store locale (locales are mapped: he → iw, zh-Hans → zh-CN, base language, then en-US; emoji are stripped, App Review rejects them). Like ship.sh itself, it never submits a build for review — after "What's New" it stops and says submission is a manual step. Re-runs change nothing that is already done.

Without a key it signs with a local TEST identity. That proves the pipeline only; Apple rejects the signature.

Proven: builds made entirely on Linux are VALID in App Store Connect, for the demo app and for NetNewsWire with its extensions and 15 frameworks. Signing details, covering entitlements (Associated Domains, push, Sign in with Apple), ROOT_RESOURCES and Xcode ExportOptions.plist, are in docs/SHIPPING.md.

Real projects

The installer puts Linux stand-ins for Apple's actool, xcstringstool and momc into the SDK, so packages declaring .xcassets, .xcstrings or Core Data resources build. The Linux ibtool compiles NetNewsWire's storyboards and Flutter's two template storyboards byte-identical to Xcode 27.0. compat/icecubes/, compat/nnw/ and compat/mastodon/ build IceCubesApp, NetNewsWire and Mastodon for iOS with their app extensions, all VALID in App Store Connect. Large projects need ulimit -n 65536 before xtool dev build.

Scripts

Documentation

Notes

Support

omarchy-apple-dev is free. If it helps you, sponsor the project or send Lightning to [email protected].

Remote iPad screen and control

For a USB iPad on another tailnet host, use ipad-screen for a password-protected HTTPS viewer, start/stop/status, and an optional user service. It mirrors and controls without building on the device host.

License

MIT

Contributors

Everyone credited so far: CONTRIBUTORS.md.

omarchy-apple-dev (joshuaswarren/omarchy-apple-dev)

Ищем в базе…

Что это?Тулчейн, который собирает iOS-приложения на Swift/SwiftUI под Omarchy Linux (Apple Silicon или x86-64) и устанавливает их на физический iPhone по USB — без Mac, без macOS и без установленного где-либо Xcode.
Это полноценная замена IDE или просто набор скриптов?Это набор скриптов на shell и Python (install-toolchain.sh, device-run.sh, ship.sh, xcodeproj2xtool.py), оборачивающих готовые open-source инструменты вроде xtool, pymobiledevice3 и rcodesign — код на Swift вы по-прежнему пишете сами, GUI-редактора нет.
Как это запустить?На Omarchy используйте Install > Development > iOS, который сам запускает install-toolchain.sh: он устанавливает Swift, собирает xtool из исходников, настраивает pymobiledevice3 в venv и один раз останавливается, чтобы запросить одноразовую загрузку Xcode.xip, если SDK ещё не в кэше.
Нужен ли Mac или платное членство Apple Developer?Mac или macOS не нужны нигде — достаточно бесплатного Apple ID, чтобы один раз скачать Xcode.xip с developer.apple.com и извлечь SDK, а бесплатного Apple ID хватает для установки на устройство без платного членства.
Работает ли беспроводная установка приложений с Linux?Нет — беспроводное развёртывание заблокировано на iOS 26 для конфигураций только с Linux, потому что iOS разрешает держать зашифрованный туннель RemotePairing только хосту, который ранее включил 'Connect via Network' (то есть Mac). Установка по USB работает везде без таких ограничений.
Работает ли это и на Apple Silicon, и на x86-64?Да — обе архитектуры покрыты: AUR swift-bin поставляет сборки aarch64 и x86-64, а установщик собирает xtool из исходников на любой из них.
Можно ли на самом деле опубликовать приложение, собранное таким способом, в App Store?Да — ship.sh собирает, подписывает и офлайн-валидирует релизный .ipa и загружает его через App Store Connect API; демонстрационное приложение и NetNewsWire с 15 фреймворками прошли обработку App Store именно так, хотя ship.sh никогда сам не отправляет сборку на ревью.
Что такое xtool и почему проект его патчит?xtool — это open-source инструмент сборки Swift/iOS, на который опирается проект; он собирается из исходников с четырьмя апстримными исправлениями, позволяющими компилировать и запускать SwiftUI-приложения полностью на Linux.
Получалось ли это у кого-то, кроме автора?Да — отзыв из сообщества подтверждает работу того же процесса на x86-64 Framework Desktop с iPhone 16 в реальном клиентском проекте.
Можно ли собирать ещё и приложения macOS, а не только iOS?ship-mac.sh умеет собирать macOS .app из пакета SwiftPM, подписывать его Developer ID и по желанию нотариализовать через сервис нотаризации Apple.
Какие есть похожие проекты?xtool, ipatool, CodeEdit, iOS-GPS-Spoofer, AirCard-macOS, placard, SkeletonView, NativeScript
Автор
joshuaswarren
Размер
2.4 MB
Звёзды
1.9K
Возраст
2 мес
Коммиты · 90 дней