--- name: apple-27-toolchain description: "Verify the selected Xcode 27 toolchain, SDKs, destinations, and relevant MCP readiness. Use for Apple setup or suspected toolchain drift affecting a build or runtime check." --- # Apple 27 Toolchain ## Purpose Use this skill before blaming app code for failures that may come from the selected developer directory, missing SDKs, unavailable simulator runtimes, stale MCP workflows, or device state. On JStar's Mac, prefer per-command or per-plugin `DEVELOPER_DIR=/Applications/Xcode-beta.app/Contents/Developer`. Do not change global `xcode-select` unless the user explicitly approves that system-level mutation. ## Workflow 1. Locate the active and candidate developer directories. - Run `xcode-select -p`. - Check `/Applications/Xcode.app` and `/Applications/Xcode-beta.app`. - If needed, use `mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode'"`. 2. Prove the selected Xcode. - `DEVELOPER_DIR= xcodebuild -version` - `DEVELOPER_DIR= xcrun swift --version` - `DEVELOPER_DIR= xcrun xcodebuild -showsdks` - Report Xcode version, build number, Swift version, selected developer directory, and SDK versions. 3. Prove only the platform tooling needed by the current project or audit. - macOS SDK: `DEVELOPER_DIR= xcrun --sdk macosx --show-sdk-version` - iOS device SDK: `DEVELOPER_DIR= xcrun --sdk iphoneos --show-sdk-version` - iOS Simulator SDK: `DEVELOPER_DIR= xcrun --sdk iphonesimulator --show-sdk-version` - watchOS SDK: `DEVELOPER_DIR= xcrun --sdk watchos --show-sdk-version` - watchOS Simulator SDK: `DEVELOPER_DIR= xcrun --sdk watchsimulator --show-sdk-version` - tvOS SDK: `DEVELOPER_DIR= xcrun --sdk appletvos --show-sdk-version` - tvOS Simulator SDK: `DEVELOPER_DIR= xcrun --sdk appletvsimulator --show-sdk-version` - visionOS SDK: `DEVELOPER_DIR= xcrun --sdk xros --show-sdk-version` - visionOS Simulator SDK: `DEVELOPER_DIR= xcrun --sdk xrsimulator --show-sdk-version` - Simulator availability: `DEVELOPER_DIR= xcrun simctl list devices available` - Xcode-visible devices: `DEVELOPER_DIR= xcrun xctrace list devices` 4. Prove destination fit for the actual project. - Use `DEVELOPER_DIR= xcodebuild -list` for schemes. - Use `DEVELOPER_DIR= xcodebuild -showdestinations -scheme ` before hardcoding a simulator or device destination. - Classify simulator compile proof, simulator runtime proof, generic device compile proof, signed physical-device proof, and macOS launch proof separately. 5. Check Apple 27 adjacent tools when relevant. - Icon Composer 2: verify `/Applications/Xcode-beta.app/Contents/Applications/Icon Composer.app` before advising layered Liquid Glass icon workflows. - XcodeBuildMCP: verify a fresh session can see the configured workflows and `DEVELOPER_DIR`. - Native Xcode MCP: when bridge setup is requested, open the project in Xcode, enable **Xcode Settings > Intelligence > Model Context Protocol > Allow external agents to use Xcode tools**, then configure the agent bridge (for Codex: `codex mcp add xcode -- xcrun mcpbridge`). Verify `codex mcp list` and a fresh agent session against the open project before depending on it. 6. Keep fixes scoped. - Prefer per-command `DEVELOPER_DIR` and plugin `.mcp.json` environment settings. - Do not sign in, trust devices, mutate teams, change certificates, download runtimes, or change global developer directory without explicit approval. - If an SDK/runtime is missing, report exactly what is missing and verify current Xcode 27 download commands before suggesting one. ## Output Provide: - selected developer directory - exact Xcode and Swift versions - SDKs and runtimes found or missing - relevant destinations and devices - MCP readiness if MCP was involved - smallest next action ## References - `../../references/apple-27-roadmap.md`