XTool——跨平台Xcode替代品
XTool – Cross-platform Xcode replacement

原始链接: https://github.com/xtool-org/xtool

xtool 是一款跨平台命令行工具,旨在使用 Swift 包管理器 (SwiftPM) 取代 Xcode 进行 iOS 开发。它支持在 Linux、Windows (WSL) 和 macOS 上构建、签名和安装来自 SwiftPM 包的 iOS 应用。 xtool 允许以编程方式与 Apple 开发者服务交互,管理身份验证并与 Darwin Swift SDK 交互。它提供创建新的 SwiftPM 项目、构建和运行项目以及管理 Apple 开发者服务帐户的功能。 它还支持设备交互,包括列出已连接的设备、安装和卸载应用(IPA 文件)以及启动已安装的应用程序。 开发者可以通过将 `XKit` 库作为 SwiftPM 依赖项添加到自己的 Swift 项目中来利用 xtool 的功能。这允许从 Swift 代码中直接访问 Apple 开发者服务、iOS 设备和其他相关功能。本质上,xtool 为 iOS 开发提供了一个完整的、开放标准的 Xcode 替代方案。

XTool被宣传为Xcode的替代品,用于构建iOS应用,但实际上它需要安装Xcode才能访问iOS SDK和工具链。这引发了关于“替代品”是否恰当的讨论。XTool的创建者澄清说,它不依赖于Xcode的构建系统、UI或专有工具,甚至包括签名和安装。它可以使用开源的Swift和Clang工具链,签名使用zsign,安装使用libimobiledevice。该工具旨在通过从Xcode中提取必要的SDK,从而在Xcode无法运行的Linux系统上实现iOS开发。 讨论涉及苹果的开发者协议,在非苹果硬件上构建iOS应用的合法性,以及这可能如何通过像Flutter这样的工具从Linux实现跨平台开发。一些用户质疑其对Hackintosh设置的影响,并建议谨慎对待苹果的许可条款。该讨论还提到了Jetbrains的AppCode的兴衰以及他们将Swift语言支持转移到CLion插件的情况。
相关文章
  • Swiftly 1.0 2025-03-28
  • (评论) 2025-05-11
  • Swift 静态 Linux SDK 2024-06-13
  • 在Linux和Windows(WSL)上构建iOS应用 2025-05-11
  • (评论) 2025-03-28

  • 原文

    Cross-platform Xcode replacement. Build and deploy iOS apps with SwiftPM on Linux, Windows, and macOS.

    xtool is a cross-platform (Linux/WSL/macOS) tool that replicates Xcode functionality with open standards.

    ✅ Build a SwiftPM package into an iOS app

    ✅ Sign and install iOS apps

    ✅ Interact with Apple Developer Services programmatically

    1. Follow the guide to install xtool
    2. Create and run your first xtool-powered app by following the tutorial!

    A screenshot of xtool being invoked from VSCode

    $ xtool --help
    OVERVIEW: Cross-platform Xcode replacement
    
    USAGE: xtool <subcommand>
    
    OPTIONS:
      -h, --help              Show help information.
    
    CONFIGURATION SUBCOMMANDS:
      setup                   Set up xtool for iOS development
      auth                    Manage Apple Developer Services authentication
      sdk                     Manage the Darwin Swift SDK
    
    DEVELOPMENT SUBCOMMANDS:
      new                     Create a new xtool SwiftPM project
      dev                     Build and run an xtool SwiftPM project
      ds                      Interact with Apple Developer Services
    
    DEVICE SUBCOMMANDS:
      devices                 List devices
      install                 Install an ipa file to your device
      uninstall               Uninstall an installed app
      launch                  Launch an installed app
    
      See 'xtool help <subcommand>' for detailed help.

    xtool includes a library that you can use to interact with Apple Developer Services, iOS devices, and more from your own app. You can use this by adding XKit as a SwiftPM dependency.

    // package dependency:
    .package(url: "https://github.com/xtool-org/xtool", .upToNextMinor(from: "1.2.0"))
    // target dependency:
    .product(name: "XKit", package: "xtool")
    联系我们 contact @ memedata.com