Skip to content

test_macos fails with 'Supported platforms for the buildables is empty' for macOS-only project #225

@andreaslindahl

Description

@andreaslindahl

Bug Report

Description

test_macos fails for a macOS-only project while build_macos succeeds and the equivalent direct xcodebuild test command works fine.

Environment

  • XcodeBuildMCP: latest (via npx)
  • Xcode: 16.2 (Build 17C52)
  • macOS: Sequoia 15.6 (Darwin 25.2.0)
  • Platform: arm64

Configuration

schemaVersion: 1
enabledWorkflows:
  - simulator
  - macos
  - debugging
sessionDefaults:
  scheme: MyApp
  projectPath: ./MyApp.xcodeproj
  platform: macOS
  arch: arm64

Steps to Reproduce

  1. Create a macOS-only SwiftUI app (no iOS targets)
  2. Configure XcodeBuildMCP with the macOS workflow enabled
  3. Run build_macos — succeeds
  4. Run test_macos with extraArgs: ["-only-testing:MyAppTests"] — fails

Expected Behavior

Tests should run, matching the behavior of the direct xcodebuild command:

xcodebuild -project MyApp.xcodeproj -scheme MyApp \
  -configuration Debug test -only-testing:MyAppTests \
  CODE_SIGN_IDENTITY="-" CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM=""

This command succeeds and all tests pass.

Actual Behavior

test_macos reports TEST FAILED with these stderr messages:

IDERunDestination: Supported platforms for the buildables in the current scheme is empty.
xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006040-000C48692100801C, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006040-000C48692100801C, name:My Mac }
IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
IDETestOperationsObserverDebug: 6.939 sec, +6.939 sec -- end
** TEST FAILED **

The tests never actually execute (0.000 sec between start and end). The "Supported platforms for the buildables in the current scheme is empty" warning appears to prevent test execution, even though build_macos handles the same project/scheme without issues.

Additional Context

  • Passing explicit -destination "platform=macOS,arch=arm64" via extraArgs does not help
  • Passing CODE_SIGN_IDENTITY=- CODE_SIGN_STYLE=Manual DEVELOPMENT_TEAM= via extraArgs does not help
  • Setting platform: macOS and arch: arm64 in session defaults does not help
  • The project's build settings confirm SUPPORTED_PLATFORMS = macosx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions