Skip to content

Eager failure when building and no XCode build settings#184726

Merged
auto-submit[bot] merged 6 commits into
flutter:masterfrom
davidmartos96:xcode_fail_if_no_build_settings
Jun 1, 2026
Merged

Eager failure when building and no XCode build settings#184726
auto-submit[bot] merged 6 commits into
flutter:masterfrom
davidmartos96:xcode_fail_if_no_build_settings

Conversation

@davidmartos96

@davidmartos96 davidmartos96 commented Apr 7, 2026

Copy link
Copy Markdown
Contributor

Fixes #184725

This PR makes the tool exit when building with XCode and we didn't parse any build setting. I understand that there are no cases where this map can be empty, as it includes the app bundle ID, which is required when building.

If we don't exit, it can show unrelated error messages to the users which could be confusing and hard to debug.
For instance, from the linked issue, one could end up getting: No valid code signing certificates were found simply because the development team build setting was not available, despite having valid certificates installed.

Sample output:

[  +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

Pre-launch Checklist

If you need help, consider asking for advice on the #hackers-new channel on Discord.

Note: The Flutter team is currently trialing the use of Gemini Code Assist for GitHub. Comments from the gemini-code-assist bot should not be taken as authoritative feedback from the Flutter team. If you find its comments useful you can update your code accordingly, but if you are unsure or disagree with the feedback, please feel free to wait for a Flutter team member's review for guidance on which automated comments should be addressed.

@davidmartos96 davidmartos96 requested a review from a team as a code owner April 7, 2026 17:51
@github-actions github-actions Bot added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. team-ios Owned by iOS platform team labels Apr 7, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements an eager failure mechanism in the iOS build process when Xcode build settings are missing, ensuring the build terminates with a clear error message. It includes a new hermetic test and updates to the mock interpreter to verify this behavior. Feedback focuses on correcting the casing of 'Xcode' for branding consistency, improving test descriptions, and using shared mock instances in tests to prevent state inconsistencies.

Comment thread packages/flutter_tools/lib/src/ios/mac.dart
Comment thread packages/flutter_tools/test/commands.shard/hermetic/build_ios_test.dart Outdated
Comment thread packages/flutter_tools/test/commands.shard/hermetic/build_ios_test.dart Outdated
Comment thread packages/flutter_tools/test/commands.shard/hermetic/build_ios_test.dart Outdated
Comment thread packages/flutter_tools/lib/src/ios/mac.dart Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@hellohuanlin hellohuanlin requested review from a team and okorohelijah April 30, 2026 21:40
@hellohuanlin

Copy link
Copy Markdown
Contributor

cc @hellohuanlin from triage

@hellohuanlin hellohuanlin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just minor nits

Comment thread packages/flutter_tools/test/commands.shard/hermetic/build_ios_test.dart Outdated
Comment thread packages/flutter_tools/lib/src/ios/mac.dart
@LongCatIsLooong LongCatIsLooong added the CICD Run CI/CD label May 14, 2026
@hellohuanlin

Copy link
Copy Markdown
Contributor

From triage: @okorohelijah do you have bandwidth to take a look? Thanks!

@okorohelijah okorohelijah added CICD Run CI/CD autosubmit Merge PR when tree becomes green via auto submit App and removed CICD Run CI/CD labels Jun 1, 2026
@auto-submit auto-submit Bot added this pull request to the merge queue Jun 1, 2026
Merged via the queue into flutter:master with commit 5cc01fe Jun 1, 2026
166 of 167 checks passed
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Jun 1, 2026
auto-submit Bot pushed a commit to flutter/packages that referenced this pull request Jun 2, 2026
flutter/flutter@54e199a...701665b

2026-06-02 engine-flutter-autoroll@skia.org Roll Skia from c97e939eb5c9 to 279b17fe9fc1 (16 revisions) (flutter/flutter#187425)
2026-06-02 bdero@google.com [Flutter GPU] Add block-compressed texture format support (BC, ETC2, ASTC LDR) (flutter/flutter#187281)
2026-06-02 bdero@google.com [Impeller] Allow attaching specific texture mip levels and slices (flutter/flutter#187066)
2026-06-02 bdero@google.com [Impeller] Fix GLES command submission status before context is current (flutter/flutter#187293)
2026-06-02 engine-flutter-autoroll@skia.org Roll Dart SDK from 3cdc25e8ffe9 to d39850bf4a01 (9 revisions) (flutter/flutter#187409)
2026-06-01 jason-simmons@users.noreply.github.com [Impeller] Use glVertexAttribDivisor on GLES3 and glVertexAttribDivisorEXT on GLES2 with the extension (flutter/flutter#187313)
2026-06-01 matt.boetger@gmail.com [Android] Add Javadoc documentation to TextInputChannel (flutter/flutter#186018)
2026-06-01 mvincentong@gmail.com Read FLTEnableWideGamut from Dart bundle (flutter/flutter#186509)
2026-06-01 matt.boetger@gmail.com [flutter_tools] Remove obsolete AndroidX console warning during Gradle builds (flutter/flutter#186077)
2026-06-01 kjlubick@users.noreply.github.com [skia] Update gni file list name hsw -> ml3 (flutter/flutter#184892)
2026-06-01 zhongliu88889@gmail.com [web] Always sync slider input attrs regardless of gesture mode (flutter/flutter#187217)
2026-06-01 zhongliu88889@gmail.com [flutter_driver] Don't throw when stderr is unavailable on web (flutter/flutter#187190)
2026-06-01 116356835+AbdeMohlbi@users.noreply.github.com Remove unused code in `FlutterPluginUtils.kt` (flutter/flutter#187012)
2026-06-01 taak140@gmail.com [flutter_tools] Fix `flutter drive --chrome-binary` being ignored on web (flutter/flutter#185481)
2026-06-01 davidmartos96@gmail.com Eager failure when building and no XCode build settings (flutter/flutter#184726)
2026-06-01 goung123@gmail.com Fix Windows Korean IME caret position during composition (flutter/flutter#186353)
2026-06-01 okorohelijah@google.com iOS: update provisioning profile for 2026-2027 cert (flutter/flutter#187280)
2026-06-01 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187380)
2026-06-01 jason-simmons@users.noreply.github.com Reland "Move dart-lang/ai to a top level third party dependency in engine (#187268)" (flutter/flutter#187378)
2026-06-01 stuartmorgan@google.com Add vector_math to Framework triage (flutter/flutter#187389)
2026-06-01 engine-flutter-autoroll@skia.org Roll Packages from e930ced to f5d50ca (4 revisions) (flutter/flutter#187381)
2026-06-01 mr_nadeem_iqbal@yahoo.com [flutter_tools] Reject archive entries that escape into a sibling directory by name prefix (#185794) (flutter/flutter#186647)
2026-06-01 bkonyi@google.com [flutter_tools] Fix widget_preview unawaited async write race condition (flutter/flutter#187177)
2026-06-01 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#187375)
2026-06-01 engine-flutter-autoroll@skia.org Roll Skia from 0aee4675e0ad to c97e939eb5c9 (7 revisions) (flutter/flutter#187371)
2026-06-01 mr_nadeem_iqbal@yahoo.com docs: Stack.clipBehavior = Clip.none does not extend hit testing (#160787) (flutter/flutter#186643)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
creatorpiyush pushed a commit to creatorpiyush/packages that referenced this pull request Jun 10, 2026
…r#11822)

flutter/flutter@54e199a...701665b

2026-06-02 engine-flutter-autoroll@skia.org Roll Skia from c97e939eb5c9 to 279b17fe9fc1 (16 revisions) (flutter/flutter#187425)
2026-06-02 bdero@google.com [Flutter GPU] Add block-compressed texture format support (BC, ETC2, ASTC LDR) (flutter/flutter#187281)
2026-06-02 bdero@google.com [Impeller] Allow attaching specific texture mip levels and slices (flutter/flutter#187066)
2026-06-02 bdero@google.com [Impeller] Fix GLES command submission status before context is current (flutter/flutter#187293)
2026-06-02 engine-flutter-autoroll@skia.org Roll Dart SDK from 3cdc25e8ffe9 to d39850bf4a01 (9 revisions) (flutter/flutter#187409)
2026-06-01 jason-simmons@users.noreply.github.com [Impeller] Use glVertexAttribDivisor on GLES3 and glVertexAttribDivisorEXT on GLES2 with the extension (flutter/flutter#187313)
2026-06-01 matt.boetger@gmail.com [Android] Add Javadoc documentation to TextInputChannel (flutter/flutter#186018)
2026-06-01 mvincentong@gmail.com Read FLTEnableWideGamut from Dart bundle (flutter/flutter#186509)
2026-06-01 matt.boetger@gmail.com [flutter_tools] Remove obsolete AndroidX console warning during Gradle builds (flutter/flutter#186077)
2026-06-01 kjlubick@users.noreply.github.com [skia] Update gni file list name hsw -> ml3 (flutter/flutter#184892)
2026-06-01 zhongliu88889@gmail.com [web] Always sync slider input attrs regardless of gesture mode (flutter/flutter#187217)
2026-06-01 zhongliu88889@gmail.com [flutter_driver] Don't throw when stderr is unavailable on web (flutter/flutter#187190)
2026-06-01 116356835+AbdeMohlbi@users.noreply.github.com Remove unused code in `FlutterPluginUtils.kt` (flutter/flutter#187012)
2026-06-01 taak140@gmail.com [flutter_tools] Fix `flutter drive --chrome-binary` being ignored on web (flutter/flutter#185481)
2026-06-01 davidmartos96@gmail.com Eager failure when building and no XCode build settings (flutter/flutter#184726)
2026-06-01 goung123@gmail.com Fix Windows Korean IME caret position during composition (flutter/flutter#186353)
2026-06-01 okorohelijah@google.com iOS: update provisioning profile for 2026-2027 cert (flutter/flutter#187280)
2026-06-01 154381524+flutteractionsbot@users.noreply.github.com Sync CHANGELOG.md from stable (flutter/flutter#187380)
2026-06-01 jason-simmons@users.noreply.github.com Reland "Move dart-lang/ai to a top level third party dependency in engine (#187268)" (flutter/flutter#187378)
2026-06-01 stuartmorgan@google.com Add vector_math to Framework triage (flutter/flutter#187389)
2026-06-01 engine-flutter-autoroll@skia.org Roll Packages from e930ced to f5d50ca (4 revisions) (flutter/flutter#187381)
2026-06-01 mr_nadeem_iqbal@yahoo.com [flutter_tools] Reject archive entries that escape into a sibling directory by name prefix (#185794) (flutter/flutter#186647)
2026-06-01 bkonyi@google.com [flutter_tools] Fix widget_preview unawaited async write race condition (flutter/flutter#187177)
2026-06-01 137456488+flutter-pub-roller-bot@users.noreply.github.com Roll pub packages (flutter/flutter#187375)
2026-06-01 engine-flutter-autoroll@skia.org Roll Skia from 0aee4675e0ad to c97e939eb5c9 (7 revisions) (flutter/flutter#187371)
2026-06-01 mr_nadeem_iqbal@yahoo.com docs: Stack.clipBehavior = Clip.none does not extend hit testing (#160787) (flutter/flutter#186643)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC stuartmorgan@google.com,tarrinneal@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
via-guy pushed a commit to via-guy/flutter that referenced this pull request Jun 26, 2026
Fixes flutter#184725

This PR makes the tool exit when building with XCode and we didn't parse
any build setting. I understand that there are no cases where this map
can be empty, as it includes the app bundle ID, which is required when
building.

If we don't exit, it can show unrelated error messages to the users
which could be confusing and hard to debug.
For instance, from the linked issue, one could end up getting: `No valid
code signing certificates were found` simply because the development
team build setting was not available, despite having valid certificates
installed.

Sample output:
```
[  +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)
           flutter#1      XcodeCodeSigningSettings._getCodeSigningBuildSettings (package:flutter_tools/src/ios/code_signing.dart:340:9)
           <asynchronous suspension>
           flutter#2      buildXcodeProject (package:flutter_tools/src/ios/mac.dart:322:26)
           <asynchronous suspension>
           flutter#3      _BuildIOSSubCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:986:37)
           <asynchronous suspension>
           flutter#4      BuildIOSArchiveCommand.runCommand (package:flutter_tools/src/commands/build_ios.dart:477:50)
           <asynchronous suspension>
           flutter#5      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1590:27)
           <asynchronous suspension>
           flutter#6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           flutter#7      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
           <asynchronous suspension>
           flutter#8      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:496:9)
           <asynchronous suspension>
           flutter#9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           flutter#10     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:431:5)
           <asynchronous suspension>
           flutter#11     FlutterCommandRunner.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:307:33)
           <asynchronous suspension>
           flutter#12     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:104:11)
           <asynchronous suspension>
           flutter#13     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:154:19)
           <asynchronous suspension>
           flutter#14     main (package:flutter_tools/executable.dart:103:3)
           <asynchronous suspension>
[        ] Running 2 shutdown hooks
[        ] Shutdown hooks complete
[  +56 ms] exiting with code 1
```

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [AI contribution guidelines] and understand my
responsibilities, or I am not using AI tools.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel
on [Discord].

**Note**: The Flutter team is currently trialing the use of [Gemini Code
Assist for
GitHub](https://developers.google.com/gemini-code-assist/docs/review-github-code).
Comments from the `gemini-code-assist` bot should not be taken as
authoritative feedback from the Flutter team. If you find its comments
useful you can update your code accordingly, but if you are unsure or
disagree with the feedback, please feel free to wait for a Flutter team
member's review for guidance on which automated comments should be
addressed.

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[AI contribution guidelines]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#ai-contribution-guidelines
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md

---------

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Elijah Okoroh <okorohelijah@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD platform-ios iOS applications specifically team-ios Owned by iOS platform team tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants