Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

macOS: `xtool dev` fails with "No valid Swift SDK bundles found" on Xcode 16.2 / Swift 6.0 (no version check)

オープン 初心者向け
#386 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
63/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
github, swift
領域
devtools

調査の方向性

Sources/PackLib/BuildSettings.swift のコメントと Installation-macOS.md の macOS インストール手順を読み、SwiftPM SDK の要件を確認してください。Swift 6.0 で issue の swift build --swift-sdk arm64-apple-ios コマンドを実行して再現し、次に xtool dev がビルド失敗をどのように処理するか確認してください。macOS ユーザーに最小バージョンを明確に示すエラーが表示されるか、文書に記載された最小バージョンが明示されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

Summary

On macOS, xtool dev builds with swift build --swift-sdk arm64-apple-ios and relies on SwiftPM's implicit Darwin SDKs, which (per the comment in Sources/PackLib/BuildSettings.swift) exist as of Swift 6.1. With Xcode 16.2 (Swift 6.0.3) the build fails with an error that doesn't point at the cause, and xtool sdk install skips on macOS, so there's no obvious way forward. There's no Swift/Xcode version check, and Installation-macOS.md only shows Swift 6.1 in example output rather than stating it as a minimum.

This bites anyone on macOS 15.3 or earlier, since Xcode 16.3 needs macOS 15.4.

Environment

  • xtool 1.23.0 (Homebrew)
  • macOS 15.3.1, Apple Silicon (M4)
  • Xcode 16.2, Apple Swift 6.0.3 (swiftlang-6.0.3.1.10)

Steps

  1. xtool setup (works fine).
  2. In an xtool project: xtool dev run --usb.
    • First run, with no ~/Library/org.swift.swiftpm/swift-sdks directory yet:
      error: The folder "swift-sdks" doesn't exist.
    • Once that directory exists (e.g. after running swift sdk list):
      error: No valid Swift SDK bundles found at ~/Library/org.swift.swiftpm/swift-sdks.
  3. xtool sdk install /path/to/Xcode.app prints Skipping SDK install; the iOS SDK ships with Xcode on macOS, so it doesn't help.

Minimal repro without xtool

mkdir -p repro/Sources/Repro && cd repro
cat > Package.swift <<'EOF'
// swift-tools-version: 6.0
import PackageDescription
let package = Package(name: "Repro", platforms: [.iOS(.v17)], targets: [.target(name: "Repro")])
EOF
echo 'public let x = 1' > Sources/Repro/Repro.swift
env -u SDKROOT "$(xcrun -f swift)" build --swift-sdk arm64-apple-ios
# error: No valid Swift SDK bundles found at ~/Library/org.swift.swiftpm/swift-sdks.

So the failure is SwiftPM 6.0's behaviour; xtool just doesn't catch it. I couldn't confirm the Swift 6.1 side on this machine (Xcode 16.3 won't install on macOS 15.3.1), so that part rests on the code comment.

Suggestion

Either or both of:

  • On macOS, check the toolchain's Swift version (or that --swift-sdk arm64-apple-ios resolves) before building, and fail with something like: xtool on macOS needs Swift 6.1+ (Xcode 16.3+); found Swift 6.0.3.
  • State the minimum Xcode/Swift version in Installation-macOS.md.

Workaround, for anyone stuck on Xcode 16.2

This got an app onto a device:

xtool dev generate-xcode-project
xcodebuild -workspace xtool/<App>.xcworkspace -scheme <App>-App \
  -sdk iphoneos -destination 'generic/platform=iOS' -derivedDataPath ./dd \
  CODE_SIGNING_ALLOWED=NO CODE_SIGNING_REQUIRED=NO build
xtool install --usb dd/Build/Products/Debug-iphoneos/<App>-App.app

xtool install signs and installs the unsigned .app fine. One thing not to try: xtool sdk build + swift sdk install of the result. That bundle is built for a Linux host and fails on macOS with a cyclic dependency in module 'DarwinFoundation' error.

主要言語
Swift
スター
5.5k
フォーク
163
平均マージ
19時間 33分
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

xtool-org/xtool のほかの issue

xtool-org/xtool の issue をすべて見る

似ている issue

Swift の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。