Skip to content

Remove specific iOS extended attributes to fix code signing#180710

Merged
auto-submit[bot] merged 26 commits intoflutter:masterfrom
Saqib198:fix-xattr-specific-attributes
Feb 19, 2026
Merged

Remove specific iOS extended attributes to fix code signing#180710
auto-submit[bot] merged 26 commits intoflutter:masterfrom
Saqib198:fix-xattr-specific-attributes

Conversation

@Saqib198
Copy link
Contributor

@Saqib198 Saqib198 commented Jan 9, 2026

Summary

Fixes #180351 by removing only the specific extended attributes that cause iOS code signing failures, while preserving Xcode-required metadata.

Changes

  • Updated removeExtendedAttributes to remove only:
    • com.apple.FinderInfo
    • com.apple.provenance
  • Preserves com.apple.xcode.CreatedByBuildSystem, which Xcode relies on for build directory management
  • Updated all related tests to expect two targeted xattr -r -d invocations

Why

The previous approach in #180355 used xattr -cr, which removed all extended attributes.
This unintentionally deleted com.apple.xcode.CreatedByBuildSystem, causing Xcode post-submit failures related to build directory ownership.

This change applies the minimal fix needed to resolve the code signing issue without breaking Xcode behavior.

Testing

  • Code formatted with dart format
  • flutter analyze passes
  • Updated and passing iOS build and signing-related tests

Addresses feedback from @jmagman

Saqib198 and others added 19 commits December 29, 2025 05:29
Changed from removing ALL extended attributes (xattr -cr) to removing
only specific problematic attributes:
- com.apple.FinderInfo
- com.apple.provenance
This preserves com.apple.xcode.CreatedByBuildSystem which Xcode requires
for build directory management, fixing the post-submit failure.
Fixes flutter#180351
@Saqib198 Saqib198 requested a review from a team as a code owner January 9, 2026 00:20
@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 Jan 9, 2026
Copy link
Contributor

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

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 refactors the logic for removing extended attributes on iOS to be more specific, targeting only com.apple.FinderInfo and com.apple.provenance to fix code signing issues while preserving Xcode metadata. The function removeFinderExtendedAttributes is renamed to removeExtendedAttributes and updated accordingly. The changes are propagated to tests, which are now updated to expect two xattr invocations. My review identifies a potentially incorrect test update and suggests an improvement to another test for better coverage.

const xattrCommand = FakeCommand(
command: <String>['xattr', '-r', '-d', 'com.apple.FinderInfo', '/'],
);
const xattrCommand = FakeCommand(command: <String>['xattr', '-cr', '/']);
Copy link
Contributor

Choose a reason for hiding this comment

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

high

This change to xattrCommand seems to contradict the goal of the pull request. The PR aims to replace the broad xattr -cr with more specific xattr -r -d <attribute> calls, but this test is being changed to use xattr -cr.

For consistency with the changes in build_ipa_test.dart and the overall goal of this PR, this should be updated to mock the two separate xattr -r -d calls for com.apple.FinderInfo and comapple.provenance. You will also need to update the places where xattrCommand is used to use the new commands.

  const xattrCommand1 = FakeCommand(
    command: <String>['xattr', '-r', '-d', 'com.apple.FinderInfo', '/'],
  );
  const xattrCommand2 = FakeCommand(
    command: <String>['xattr', '-r', '-d', 'com.apple.provenance', '/'],
  );

Comment on lines +806 to 807
expect(logger.traceText, contains('Failed to remove com.apple.FinderInfo'));
expect(processManager, hasNoRemainingExpectations);
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This test case is named 'ignores errors' and correctly sets up two failing xattr commands. However, it only asserts that the log contains the failure message for com.apple.FinderInfo. To make the test more robust and ensure both failures are handled gracefully, it would be good to also check for the com.apple.provenance failure message.

      expect(logger.traceText, contains('Failed to remove com.apple.FinderInfo'));
      expect(logger.traceText, contains('Failed to remove com.apple.provenance'));
      expect(processManager, hasNoRemainingExpectations);

Saqib198 and others added 3 commits January 9, 2026 05:26
- Fixed missed xattr command in build_ios_test.dart
- Improved error test to check both attribute failures
Remove obvious type annotations as required by CI analyzer
Saqib198 and others added 2 commits January 9, 2026 15:08
Follow-up to review feedback: make the attributes collection a const Set for clarity and immutability.

Co-authored-by: Navaron Bracke <[email protected]>
@hellohuanlin hellohuanlin requested review from okorohelijah and vashworth and removed request for vashworth January 15, 2026 22:32
Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

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

Thanks for re-doing this! Sorry for the post-submit test failure hassle.

Copy link
Contributor

@okorohelijah okorohelijah left a comment

Choose a reason for hiding this comment

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

nit but lgtm

if (!success) {
logger.printTrace('Failed to remove xattr com.apple.FinderInfo from ${projectDirectory.path}');
// Remove specific extended attributes that cause code signing failures.
// We remove com.apple.FinderInfo and com.apple.provenance, but preserve
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: I dont think the comment is needed since it is kinda obvious form the variable name and it is already stated in ln 707-711

@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 12, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 12, 2026

autosubmit label was removed for flutter/flutter/180710, because The base commit of the PR is older than 7 days and can not be merged. Please merge the latest changes from the main into this branch and resubmit the PR.

@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 12, 2026
@okorohelijah okorohelijah added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 13, 2026
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 13, 2026
@auto-submit
Copy link
Contributor

auto-submit bot commented Feb 13, 2026

autosubmit label was removed for flutter/flutter/180710, because - The status or check suite Windows tool_integration_tests_7_9 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@hellohuanlin hellohuanlin added the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
@auto-submit auto-submit bot added this pull request to the merge queue Feb 19, 2026
Merged via the queue into flutter:master with commit 81c9151 Feb 19, 2026
144 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Feb 19, 2026
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Feb 20, 2026
…11088)

Manual roll Flutter from c023e5b2474f to 91b2d41a66d1 (31 revisions)

Manual roll requested by [email protected]

flutter/flutter@c023e5b...91b2d41

2026-02-19 [email protected] Reland #179643, only scroll hit-testable primary scroll views on status bar tap (flutter/flutter#182391)
2026-02-19 [email protected] Replace References to `flutter/engine` with `flutter/flutter` (flutter/flutter#182600)
2026-02-19 [email protected] Remove specific iOS extended attributes to fix code signing (flutter/flutter#180710)
2026-02-19 [email protected] Manual roll Skia from 7bbdc51ab0aa to ce5854495a3a (flutter/flutter#182637)
2026-02-19 [email protected] [pv]add integration test for original untappable web view link behind context menu bug (flutter/flutter#182111)
2026-02-19 [email protected] Roll pub packages (flutter/flutter#182579)
2026-02-19 [email protected] Remove Material import from scroll_view_test.dart (flutter/flutter#181281)
2026-02-19 [email protected] Add RawTooltip.ignorePointer (flutter/flutter#182527)
2026-02-19 [email protected] [web] Stop double loading fonts for WebParagraph (flutter/flutter#182026)
2026-02-19 [email protected] Migrate abi build paths to use new abi filtering api #AGP9 (flutter/flutter#181828)
2026-02-19 [email protected] [web] Flutter errors should be reported with console.error() (flutter/flutter#178886)
2026-02-19 [email protected] Manual roll Skia from dfe78d132e24 to 7bbdc51ab0aa (8 revisions) (flutter/flutter#182612)
2026-02-19 [email protected] Refactor autofill_group_test.dart to remove Material dependencies (flutter/flutter#181903)
2026-02-19 [email protected] Roll Packages from 59f905c to 9da22bf (8 revisions) (flutter/flutter#182611)
2026-02-19 [email protected] Roll Fuchsia Linux SDK from Ihau0pUz3u5ajw42u... to KfPgw04T0OEADLJA5... (flutter/flutter#182607)
2026-02-19 [email protected] Marks Mac_arm64_mokey entrypoint_dart_registrant unflaky (flutter/flutter#181648)
2026-02-19 [email protected] Remove material from Modal barrier tests (flutter/flutter#181708)
2026-02-19 [email protected] Remove material from ticker mode test (flutter/flutter#181696)
2026-02-19 [email protected] Remove material imports from Inherited Model, Magnifier, SafeArea, UndoHistory, Navigator and Layers test (flutter/flutter#181709)
2026-02-19 [email protected] docs: fix grammar in animation library documentation (flutter/flutter#182461)
2026-02-19 [email protected] Handle#6537 first grouped tests (flutter/flutter#182077)
2026-02-19 [email protected] Move SelectionArea web test from widgets to material folder (flutter/flutter#181951)
2026-02-19 [email protected] Roll Dart SDK from 44895e617182 to 2642761fca94 (6 revisions) (flutter/flutter#182572)
2026-02-19 [email protected] Update create template to always generate both SwiftPM and CocoaPods support for iOS/macOS plugins (flutter/flutter#181251)
2026-02-18 [email protected] Fix(Material): DateRangePicker ignores DatePickerTheme.dayShape (flutter/flutter#181658)
2026-02-18 [email protected] Fixing ExpansionTile expandedAlignment not Accepts AlignmentGeometry … (flutter/flutter#180814)
2026-02-18 [email protected] Give guided error message when CocoaPod and SwiftPM dependency conflicts (flutter/flutter#182392)
2026-02-18 [email protected] Remove material from interactive_viewer_test.dart (flutter/flutter#181465)
2026-02-18 [email protected] Bring Windows misc coverage out of bringup (flutter/flutter#182332)
2026-02-18 [email protected] Update android symbolication instructions (flutter/flutter#181267)
2026-02-18 [email protected] Unmark stable vulkan platform view tests as bringup (flutter/flutter#182554)

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 [email protected],[email protected] 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:
...
ahmedsameha1 pushed a commit to ahmedsameha1/flutter that referenced this pull request Feb 27, 2026
…180710)

## Summary
Fixes flutter#180351 by removing only the specific extended attributes that
cause iOS code signing failures, while preserving Xcode-required
metadata.

## Changes
- Updated `removeExtendedAttributes` to remove only:
  - `com.apple.FinderInfo`
  - `com.apple.provenance`
- Preserves `com.apple.xcode.CreatedByBuildSystem`, which Xcode relies
on for build directory management
- Updated all related tests to expect two targeted `xattr -r -d`
invocations

## Why
The previous approach in flutter#180355 used `xattr -cr`, which removed **all**
extended attributes.
This unintentionally deleted `com.apple.xcode.CreatedByBuildSystem`,
causing Xcode post-submit failures related to build directory ownership.

This change applies the minimal fix needed to resolve the code signing
issue without breaking Xcode behavior.

## Testing
- [x] Code formatted with `dart format`
- [x] `flutter analyze` passes
- [x] Updated and passing iOS build and signing-related tests

Addresses feedback from @jmagman

---------

Co-authored-by: Navaron Bracke <[email protected]>
Co-authored-by: Elijah Okoroh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

Failure to codesign iOS app due to xattr issue

6 participants