最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

ios - "Unable to find a device matching the provided destination specifier" when trying to build Xcode project

programmeradmin2浏览0评论

I want to build docs using jazzy for my Xcode project, however, it fails, despite having worked previously (perhaps on a different version of Xcode, or iOS SDK):

jazzy \
    --module FooBar \
    --swift-build-tool xcodebuild \
    --build-tool-arguments -scheme,FooBar,-sdk,iphonesimulator,-destination,platform="iOS Simulator" \
    --include Sources/FooBar/FooBarExample/FooBar.swift,Sources/FooBar/Builders/FooBarBuilder.swift \
    --readme README.md \
    --output docs/foo_bar
2025-03-24 20:40:25.969 xcodebuild[4527:48333546] Writing error result bundle to /var/folders/3h/9h8lqbnx0p372m8qh7fpd1dh0000gn/T/ResultBundle_2025-24-03_20-40-0025.xcresult
xcodebuild: error: Could not configure request to show build settings: Unable to find a device matching the provided destination specifier:
                { platform:iOS Simulator }

        The requested device could not be found because no available devices matched the request.

        Available destinations for the "FooBar" scheme:
                { platform:macOS, arch:arm64e, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:arm64, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:x86_64, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:arm64e, variant:Mac Catalyst, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:arm64, variant:Mac Catalyst, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:x86_64, variant:Mac Catalyst, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:arm64, variant:DriverKit, id:00006000-001C798214E2801E, name:My Mac }
                { platform:macOS, arch:arm64, variant:Designed for [iPad,iPhone], id:00006000-001C798214E2801E, name:My Mac }
                { platform:DriverKit, name:Any DriverKit Host }
                { platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device }
                { platform:iOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-iphonesimulator:placeholder, name:Any iOS Simulator Device }
                { platform:macOS, name:Any Mac }
                { platform:macOS, variant:Mac Catalyst, name:Any Mac }
                { platform:tvOS, id:dvtdevice-DVTiOSDevicePlaceholder-appletvos:placeholder, name:Any tvOS Device }
                { platform:tvOS Simulator, id:dvtdevice-DVTiOSDeviceSimulatorPlaceholder-appletvsimulator:placeholder, name:Any tvOS Simulator Device }
                { platform:tvOS Simulator, id:932A3FAF-FAD5-4C6A-9155-2A0420E70C39, OS:18.2, name:Apple TV }
                { platform:tvOS Simulator, id:932A3FAF-FAD5-4C6A-9155-2A0420E70C39, OS:18.2, name:Apple TV }
                { platform:tvOS Simulator, id:F06C7C6D-61CA-4047-AD73-59D0023EDABD, OS:18.2, name:Apple TV 4K (3rd generation) }
                { platform:tvOS Simulator, id:F06C7C6D-61CA-4047-AD73-59D0023EDABD, OS:18.2, name:Apple TV 4K (3rd generation) }
                { platform:tvOS Simulator, id:F621B76A-DD98-4955-9963-134381647E18, OS:18.2, name:Apple TV 4K (3rd generation) (at 1080p) }
                { platform:tvOS Simulator, id:F621B76A-DD98-4955-9963-134381647E18, OS:18.2, name:Apple TV 4K (3rd generation) (at 1080p) }
                { platform:iOS Simulator, id:5FC0DFEA-37EC-4FF5-AB53-3244C7347B3A, OS:18.3.1, name:iPad (10th generation) }
                { platform:iOS Simulator, id:5FC0DFEA-37EC-4FF5-AB53-3244C7347B3A, OS:18.3.1, name:iPad (10th generation) }
                { platform:iOS Simulator, id:9C9575CC-59D4-4550-A806-1E85A1E94C8B, OS:18.3.1, name:iPad (A16) }
                { platform:iOS Simulator, id:9C9575CC-59D4-4550-A806-1E85A1E94C8B, OS:18.3.1, name:iPad (A16) }
                { platform:iOS Simulator, id:7943425E-DE35-4423-AE40-2FC9AEECC457, OS:18.3.1, name:iPad Air 11-inch (M2) }
                { platform:iOS Simulator, id:7943425E-DE35-4423-AE40-2FC9AEECC457, OS:18.3.1, name:iPad Air 11-inch (M2) }
                { platform:iOS Simulator, id:CA2544C2-0176-41F3-985D-06473B6DE541, OS:18.3.1, name:iPad Air 11-inch (M3) }
                { platform:iOS Simulator, id:CA2544C2-0176-41F3-985D-06473B6DE541, OS:18.3.1, name:iPad Air 11-inch (M3) }
                { platform:iOS Simulator, id:7D38F2A6-09CD-4EC1-AA72-039FC04C2650, OS:18.3.1, name:iPad Air 13-inch (M2) }
                { platform:iOS Simulator, id:7D38F2A6-09CD-4EC1-AA72-039FC04C2650, OS:18.3.1, name:iPad Air 13-inch (M2) }
                { platform:iOS Simulator, id:F6820745-8DA0-4C69-8305-5A1F94D901BA, OS:18.3.1, name:iPad Air 13-inch (M3) }
                { platform:iOS Simulator, id:F6820745-8DA0-4C69-8305-5A1F94D901BA, OS:18.3.1, name:iPad Air 13-inch (M3) }
                { platform:iOS Simulator, id:179BF4A9-0AE7-4557-A7EF-C4B0ACEC1B2B, OS:18.3.1, name:iPad Pro 11-inch (M4) }
                { platform:iOS Simulator, id:179BF4A9-0AE7-4557-A7EF-C4B0ACEC1B2B, OS:18.3.1, name:iPad Pro 11-inch (M4) }
                { platform:iOS Simulator, id:F59D6104-8AC6-4CAE-8883-AA53A33547E7, OS:18.3.1, name:iPad Pro 13-inch (M4) }
                { platform:iOS Simulator, id:F59D6104-8AC6-4CAE-8883-AA53A33547E7, OS:18.3.1, name:iPad Pro 13-inch (M4) }
                { platform:iOS Simulator, id:9AD51F28-AF59-4C3C-AE4B-1AA009C0D47E, OS:18.3.1, name:iPad mini (A17 Pro) }
                { platform:iOS Simulator, id:9AD51F28-AF59-4C3C-AE4B-1AA009C0D47E, OS:18.3.1, name:iPad mini (A17 Pro) }
                { platform:iOS Simulator, id:F459FF20-F698-4C0B-9148-C090C618A872, OS:18.3.1, name:iPhone 16 }
                { platform:iOS Simulator, id:F459FF20-F698-4C0B-9148-C090C618A872, OS:18.3.1, name:iPhone 16 }
                { platform:iOS Simulator, id:46AFD9C3-9CAB-4817-8E2B-2B55C77DC81C, OS:18.3.1, name:iPhone 16 Plus }
                { platform:iOS Simulator, id:46AFD9C3-9CAB-4817-8E2B-2B55C77DC81C, OS:18.3.1, name:iPhone 16 Plus }
                { platform:iOS Simulator, id:BAA2D8DB-E21D-4651-A708-268BACBD904C, OS:18.3.1, name:iPhone 16 Pro }
                { platform:iOS Simulator, id:BAA2D8DB-E21D-4651-A708-268BACBD904C, OS:18.3.1, name:iPhone 16 Pro }
                { platform:iOS Simulator, id:85FC77D1-ECC9-444E-8C7B-6968A49EF61D, OS:18.3.1, name:iPhone 16 Pro Max }
                { platform:iOS Simulator, id:85FC77D1-ECC9-444E-8C7B-6968A49EF61D, OS:18.3.1, name:iPhone 16 Pro Max }
                { platform:iOS Simulator, id:5F4AD36B-9FA5-4E08-8700-0E23F5519C89, OS:18.3.1, name:iPhone 16e }
                { platform:iOS Simulator, id:5F4AD36B-9FA5-4E08-8700-0E23F5519C89, OS:18.3.1, name:iPhone 16e }
                { platform:iOS Simulator, id:0EEF6E3F-B8CA-4850-AD64-87028CB9CF90, OS:18.3.1, name:iPhone SE (3rd generation) }
                { platform:iOS Simulator, id:0EEF6E3F-B8CA-4850-AD64-87028CB9CF90, OS:18.3.1, name:iPhone SE (3rd generation) }

        Ineligible destinations for the "FooBar" scheme:
                { platform:visionOS, id:dvtdevice-DVTiOSDevicePlaceholder-xros:placeholder, name:Any visionOS Device, error:visionOS 2.2 is not installed. To use with Xcode, first download and install the platform }
                { platform:watchOS, id:dvtdevice-DVTiOSDevicePlaceholder-watchos:placeholder, name:Any watchOS Device, error:watchOS 11.2 is not installed. To use with Xcode, first download and install the platform }
Running xcodebuild
Could not successfully run `xcodebuild`.
Please check the build arguments.
Saved `xcodebuild` log file: /var/folders/3h/9h8lqbnx0p372m8qh7fpd1dh0000gn/T/xcodebuild-53A5F127-90AF-47A6-B0C9-CC451567DEE0.log
Error: Failed to generate documentation
/Users/werner/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/jazzy-0.15.3/lib/jazzy/executable.rb:39:in `execute_command': /Users/werner/.rbenv/versions/3.3.0/lib/ruby/gems/3.3.0/gems/jazzy-0.15.3/bin/sourcekitten ["doc", "--module-name", "FooBar", "--", "-scheme", "FooBar", "-sdk", "iphonesimulator", "-destination", "platform\\=iOS\\ Simulator"] (RuntimeError)

2025-03-24 20:40:25.969 xcodebuild[4527:48333546] Writing error result bundle to /var/folders/3h/9h8lqbnx0p372m8qh7fpd1dh0000gn/T/ResultBundle_2025-24-03_20-40-0025.xcresult

What would I have to change to make this work again?

I must note that the project itself builds fine in Xcode. I have the following SDKs installed:

This is how the project is set up to build in Xcode:

I have looked at the following questions, but they do not solve this problem:

  • xcodebuild: error - Unable to find a destination matching the provided destination specifier --> I don't have a runner, and whatever I'm building is already set to iOS
  • Xcodebuild: Unable to find a destination matching the provided destination specifier --> The deployment target has not been changed; it has been 14.0 for quite some time now, and I bumped it to 15.0 (because that's the one that's supported in Xcode Version 16.2). Still does not build.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论