Skip to content

build ios shows unrelated error message if it fails to get XCode build settings #184725

Description

@davidmartos96

Steps to reproduce

On my team we have just setup a new XCode installation on our CI/CD pipeline with fastlane.
We were getting a very odd error about a missing codesign certificate: No valid code signing certificates were found . We have a valid certificate using fastlane Match.
After enabling verbose logging and looking at the full log we encountered that the reason was not an invalid codesign setup. The build was failing because we didn't have the iPhone SDK installed in the XCode installation. This was a silent error from getBuildSettings (Unexpected failure to get Xcode build settings).
The function getBuildSettings was returning an empty map and then it failed on the first place that actually checked for field in the map, which was the codesign codepath.

I propose eagerly failing if the xcode build settings map is empty, unless there is a reason why this is not being checked.

Expected results

Eager failure to not show unrelated errors.

Actual results

Unrelated error messages

Code sample

counter app would be enough

Screenshots or Video

No response

Logs

Logs
[  +63 ms] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[        ] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[ +765 ms] Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:53.692 xcodebuild[9020:45597] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0053.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
[        ] Unexpected failure to get Xcode build settings: ProcessException: Process exited abnormally with exit code 64:
           Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:53.692 xcodebuild[9020:45597] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0053.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
             Command: /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios.
[   +2 ms] Archiving example.com.myapp...
[  +25 ms] Migrating AppFrameworkInfo.plist contents
[        ] Upgrading AppFrameworkInfo.plist
[        ] Upgrading Podfile
[   +9 ms] The Swift Package Manager feature is off. Skipping the migration that adds Swift Package Manager integration...
[   +6 ms] executing: xattr -r -d com.apple.FinderInfo /Users/admin/builds/AEFj1IwjB/0/repo
[+1948 ms] Failed to remove xattr com.apple.FinderInfo from /Users/admin/builds/AEFj1IwjB/0/repo
[   +1 ms] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[        ] executing: [/Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj/] /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
[ +920 ms] Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:56.608 xcodebuild[9023:45646] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0056.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
[        ] Unexpected failure to get Xcode build settings: ProcessException: Process exited abnormally with exit code 64:
           Command line invocation:
               /Applications/Xcode-26.3.0.app/Contents/Developer/usr/bin/xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           Build settings from command line:
               BUILD_DIR = /Users/admin/builds/AEFj1IwjB/0/repo/build/ios
           2026-04-06 17:36:56.608 xcodebuild[9023:45646] Writing error result bundle to /var/folders/4p/084k9rr96ld_w60n8rdr0wtm0000gn/T/ResultBundle_2026-06-04_17-36-0056.xcresult
           xcodebuild: error: Could not configure request to show build settings: Unable to find a destination matching the provided destination specifier:
           		{ generic:1, platform:iOS }
           	Ineligible destinations for the "Runner" scheme:
           		{ platform:iOS, id:dvtdevice-DVTiPhonePlaceholder-iphoneos:placeholder, name:Any iOS Device, error:iOS 26.2 is not installed. Please download and install the platform from Xcode > Settings > Components. }
             Command: /usr/bin/arch -arm64e xcrun xcodebuild -project /Users/admin/builds/AEFj1IwjB/0/repo/ios/Runner.xcodeproj -scheme Runner -configuration Release -destination generic/platform=iOS -showBuildSettings BUILD_DIR=/Users/admin/builds/AEFj1IwjB/0/repo/build/ios.
[  +66 ms] executing: which security
[   +4 ms] executing: which openssl
[  +22 ms] executing: security find-identity -p codesigning -v
[  +57 ms]   1) <ID> "Apple Distribution: ACME. (<ID>)"
                1 valid identities found
[   +1 ms] ════════════════════════════════════════════════════════════════════════════════
           No valid code signing certificates were found
           You can connect to your Apple Developer account by signing in with your Apple ID
           in Xcode and create an iOS Development Certificate as well as a Provisioning 
           Profile for your project by:
             1- Open the Flutter project's Xcode target with
                  open ios/Runner.xcworkspace
             2- Select the 'Runner' project in the navigator then the 'Runner' target
                in the project settings
             3- Make sure a 'Development Team' is selected under Signing & Capabilities > Team. 
                You may need to:
                    - Log in with your Apple ID in Xcode first
                    - Ensure you have a valid unique Bundle ID
                    - Register your device with your Apple Developer Account
                    - Let Xcode automatically provision a profile for your app
             4- Build or run your project again
             5- Trust your newly created Development Certificate on your iOS device
                via Settings > General > Device Management > [your new certificate] > Trust
           For more information, please visit:
             https://developer.apple.com/library/content/documentation/IDEs/Conceptual/
             AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html
           Or run on an iOS simulator without code signing
           ════════════════════════════════════════════════════════════════════════════════
[   +1 ms] "flutter ipa" took 7,479ms.
[   +2 ms] executing: sw_vers -productName
[   +8 ms] Exit code 0 from: sw_vers -productName
[        ] macOS
[        ] executing: sw_vers -productVersion
[   +6 ms] Exit code 0 from: sw_vers -productVersion
[        ] 26.0
[        ] executing: sw_vers -buildVersion
[   +6 ms] Exit code 0 from: sw_vers -buildVersion
[        ] 25A354
[        ] executing: uname -m
[  +10 ms] Exit code 0 from: uname -m
[        ] arm64
[  +20 ms] No development certificates available to code sign app for device deployment
[        ] 
           #0      throwToolExit (package:flutter_tools/src/base/common.dart:34:3)
           #1      XcodeCodeSigningSettings._getCodeSigningBuildSettings (package:flutter_tools/src/ios/code_signing.dart:340:9)
           <asynchronous suspension>
           #2      buildXcodeProject (package:flutter_tools/src/ios/mac.dart:322:26)
           <asynchronous suspension>
           #3      _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:986:37)
           <asynchronous suspension>
           #4      BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:477:50)
           <asynchronous suspension>
           #5      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1590:27)
           <asynchronous suspension>
           #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #7      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           #8      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
           <asynchronous suspension>
           #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
           <asynchronous suspension>
           #11     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
           <asynchronous suspension>
           #12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:104:11)
           <asynchronous suspension>
           #13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           #14     main (package:flutter_tools/executable.dart:103:3)
           <asynchronous suspension>
[        ] Running 2 shutdown hooks
[        ] Shutdown hooks complete
[  +56 ms] exiting with code 1

Flutter Doctor output

Flutter 3.41.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions