flutter_tools: correct iOS signing log for manual code signing (CODE_SIGN_STYLE=Manual)#177852
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request corrects a misleading log message that appeared during iOS builds using manual code signing. The change adds a condition to check the CODE_SIGN_STYLE from the build settings. If the style is 'Manual', it correctly suppresses the 'Automatically signing...' log. This is a good improvement as it reduces user confusion. A new test is included to verify that the log message is not displayed for manual signing setups, ensuring the fix is effective. The implementation is straightforward and the changes look good.
|
CLA signed |
CI Status Follow-upI see the
This appears unrelated to ci.yaml configuration. Could the maintainers please review the ci.yaml failure to determine if it's a check issue or requires action on my end? All other checks (CLA, code review) are passing. The fix is minimal, focused, and includes test coverage. |
aca02ed to
a8bbfd5
Compare
…nual When DEVELOPMENT_TEAM is set in the Xcode project but CODE_SIGN_STYLE is Manual, Flutter was still logging 'Automatically signing iOS...' which is misleading since manual signing is not automatic. This change checks CODE_SIGN_STYLE before logging the automatic signing message. If it's Manual, no message is logged (or a more accurate message could be logged in the future). Fixes the misleading log output for users who use manual code signing with ExportOptions.plist for App Store distribution.
…t.dart test(code_signing): assert manual signing does NOT log "Automatically signing..." Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
…=Manual test Addresses reviewer feedback to explicitly test that the misleading 'Auto signing iOS...' message is not present, rather than just checking isEmpty. Uses single quotes and proper formatting.
df4408b to
6ebb110
Compare
|
@LouiseHsu Can you do a second review? |
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
…SIGN_STYLE=Manual) (flutter#177852) ## Summary When running `flutter build ipa` with a project that uses manual code signing (`CODE_SIGN_STYLE=Manual`) for Release/Profile, the tool currently prints: ``` Automatically signing iOS for device deployment using specified development team in Xcode project: x ``` This is misleading in two ways: 1. The project is not using automatic signing for Release/Profile, it's explicitly using manual signing with a provisioning profile. 2. The build in this mode is typically for App Store/TestFlight distribution, not just device deployment. Users who rely on manual signing (for example, Push Notifications + Sign in with Apple entitlements) often hit an `xcodebuild -exportArchive` failure later (`"Runner.app" requires a provisioning profile ...`) and assume Flutter overrode their signing, because of this log line. This confusion has been reported in the context of `flutter build ipa` where archive succeeds but export fails, and Flutter's messaging doesn't match the actual signing setup. **Related issues:** - flutter#106612 - Support `flutter build ipa` with manual signing and provisioning profiles - flutter#113977 - Flutter build IPA with --export-options-plist not working ## What this change does * Before logging "Automatically signing iOS ...", we now check the active build configuration's `CODE_SIGN_STYLE`. * If the style is `Manual`, we suppress the automatic-signing message (since manual signing is not automatic). * If the style is `Automatic` or not set, we keep the original behavior. * No functional behavior of signing or export is changed. ## Before ``` Automatically signing iOS for device deployment using specified development team in Xcode project: x ``` (This message appears even when `CODE_SIGN_STYLE=Manual`) ## After ``` (No message when CODE_SIGN_STYLE=Manual, since signing is not automatic) ``` (The message only appears when `CODE_SIGN_STYLE=Automatic` or not set) ## Tests * Added test in `packages/flutter_tools/test/general.shard/ios/code_signing_test.dart` to assert we don't emit the automatic-signing message when `CODE_SIGN_STYLE=Manual`. * All existing tests pass (40/40 tests in code_signing_test.dart). ## Why this helps * Reduces confusion around manual signing / App Store export flows. * Matches expectations from users who configure provisioning profiles manually and expect Flutter to respect that configuration. * Prevents users from thinking Flutter is overriding their manual signing setup based on misleading log output. ## Breaking Changes None. This change only affects log output and does not modify any signing behavior, export behavior, or CLI interface. ## Verification Reviewers can verify this fix by: 1. Creating a test iOS project with `CODE_SIGN_STYLE=Manual` and `DEVELOPMENT_TEAM` set in Xcode project settings 2. Running `flutter build ipa --release --verbose` 3. Confirming the log does NOT show "Automatically signing iOS..." 4. Verifying the app still builds/signs correctly The included unit test covers this scenario automatically. --- Supersedes flutter#177851 (that PR accidentally included unrelated commits from my fork history). This version only includes the intended change and tests. --------- Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
…SIGN_STYLE=Manual) (flutter#177852) ## Summary When running `flutter build ipa` with a project that uses manual code signing (`CODE_SIGN_STYLE=Manual`) for Release/Profile, the tool currently prints: ``` Automatically signing iOS for device deployment using specified development team in Xcode project: x ``` This is misleading in two ways: 1. The project is not using automatic signing for Release/Profile, it's explicitly using manual signing with a provisioning profile. 2. The build in this mode is typically for App Store/TestFlight distribution, not just device deployment. Users who rely on manual signing (for example, Push Notifications + Sign in with Apple entitlements) often hit an `xcodebuild -exportArchive` failure later (`"Runner.app" requires a provisioning profile ...`) and assume Flutter overrode their signing, because of this log line. This confusion has been reported in the context of `flutter build ipa` where archive succeeds but export fails, and Flutter's messaging doesn't match the actual signing setup. **Related issues:** - flutter#106612 - Support `flutter build ipa` with manual signing and provisioning profiles - flutter#113977 - Flutter build IPA with --export-options-plist not working ## What this change does * Before logging "Automatically signing iOS ...", we now check the active build configuration's `CODE_SIGN_STYLE`. * If the style is `Manual`, we suppress the automatic-signing message (since manual signing is not automatic). * If the style is `Automatic` or not set, we keep the original behavior. * No functional behavior of signing or export is changed. ## Before ``` Automatically signing iOS for device deployment using specified development team in Xcode project: x ``` (This message appears even when `CODE_SIGN_STYLE=Manual`) ## After ``` (No message when CODE_SIGN_STYLE=Manual, since signing is not automatic) ``` (The message only appears when `CODE_SIGN_STYLE=Automatic` or not set) ## Tests * Added test in `packages/flutter_tools/test/general.shard/ios/code_signing_test.dart` to assert we don't emit the automatic-signing message when `CODE_SIGN_STYLE=Manual`. * All existing tests pass (40/40 tests in code_signing_test.dart). ## Why this helps * Reduces confusion around manual signing / App Store export flows. * Matches expectations from users who configure provisioning profiles manually and expect Flutter to respect that configuration. * Prevents users from thinking Flutter is overriding their manual signing setup based on misleading log output. ## Breaking Changes None. This change only affects log output and does not modify any signing behavior, export behavior, or CLI interface. ## Verification Reviewers can verify this fix by: 1. Creating a test iOS project with `CODE_SIGN_STYLE=Manual` and `DEVELOPMENT_TEAM` set in Xcode project settings 2. Running `flutter build ipa --release --verbose` 3. Confirming the log does NOT show "Automatically signing iOS..." 4. Verifying the app still builds/signs correctly The included unit test covers this scenario automatically. --- Supersedes flutter#177851 (that PR accidentally included unrelated commits from my fork history). This version only includes the intended change and tests. --------- Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
…SIGN_STYLE=Manual) (flutter#177852) ## Summary When running `flutter build ipa` with a project that uses manual code signing (`CODE_SIGN_STYLE=Manual`) for Release/Profile, the tool currently prints: ``` Automatically signing iOS for device deployment using specified development team in Xcode project: x ``` This is misleading in two ways: 1. The project is not using automatic signing for Release/Profile, it's explicitly using manual signing with a provisioning profile. 2. The build in this mode is typically for App Store/TestFlight distribution, not just device deployment. Users who rely on manual signing (for example, Push Notifications + Sign in with Apple entitlements) often hit an `xcodebuild -exportArchive` failure later (`"Runner.app" requires a provisioning profile ...`) and assume Flutter overrode their signing, because of this log line. This confusion has been reported in the context of `flutter build ipa` where archive succeeds but export fails, and Flutter's messaging doesn't match the actual signing setup. **Related issues:** - flutter#106612 - Support `flutter build ipa` with manual signing and provisioning profiles - flutter#113977 - Flutter build IPA with --export-options-plist not working ## What this change does * Before logging "Automatically signing iOS ...", we now check the active build configuration's `CODE_SIGN_STYLE`. * If the style is `Manual`, we suppress the automatic-signing message (since manual signing is not automatic). * If the style is `Automatic` or not set, we keep the original behavior. * No functional behavior of signing or export is changed. ## Before ``` Automatically signing iOS for device deployment using specified development team in Xcode project: x ``` (This message appears even when `CODE_SIGN_STYLE=Manual`) ## After ``` (No message when CODE_SIGN_STYLE=Manual, since signing is not automatic) ``` (The message only appears when `CODE_SIGN_STYLE=Automatic` or not set) ## Tests * Added test in `packages/flutter_tools/test/general.shard/ios/code_signing_test.dart` to assert we don't emit the automatic-signing message when `CODE_SIGN_STYLE=Manual`. * All existing tests pass (40/40 tests in code_signing_test.dart). ## Why this helps * Reduces confusion around manual signing / App Store export flows. * Matches expectations from users who configure provisioning profiles manually and expect Flutter to respect that configuration. * Prevents users from thinking Flutter is overriding their manual signing setup based on misleading log output. ## Breaking Changes None. This change only affects log output and does not modify any signing behavior, export behavior, or CLI interface. ## Verification Reviewers can verify this fix by: 1. Creating a test iOS project with `CODE_SIGN_STYLE=Manual` and `DEVELOPMENT_TEAM` set in Xcode project settings 2. Running `flutter build ipa --release --verbose` 3. Confirming the log does NOT show "Automatically signing iOS..." 4. Verifying the app still builds/signs correctly The included unit test covers this scenario automatically. --- Supersedes flutter#177851 (that PR accidentally included unrelated commits from my fork history). This version only includes the intended change and tests. --------- Co-authored-by: Navaron Bracke <brackenavaron@gmail.com>
…g (CODE_SIGN_STYLE=Manual) (flutter/flutter#177852)
Summary
When running
flutter build ipawith a project that uses manual code signing (CODE_SIGN_STYLE=Manual) for Release/Profile, the tool currently prints:This is misleading in two ways:
Users who rely on manual signing (for example, Push Notifications + Sign in with Apple entitlements) often hit an
xcodebuild -exportArchivefailure later ("Runner.app" requires a provisioning profile ...) and assume Flutter overrode their signing, because of this log line. This confusion has been reported in the context offlutter build ipawhere archive succeeds but export fails, and Flutter's messaging doesn't match the actual signing setup.Related issues:
flutter build ipawith manual signing and provisioning profiles #106612 - Supportflutter build ipawith manual signing and provisioning profilesWhat this change does
CODE_SIGN_STYLE.Manual, we suppress the automatic-signing message (since manual signing is not automatic).Automaticor not set, we keep the original behavior.Before
(This message appears even when
CODE_SIGN_STYLE=Manual)After
(The message only appears when
CODE_SIGN_STYLE=Automaticor not set)Tests
packages/flutter_tools/test/general.shard/ios/code_signing_test.dartto assert we don't emit the automatic-signing message whenCODE_SIGN_STYLE=Manual.Why this helps
Breaking Changes
None. This change only affects log output and does not modify any signing behavior, export behavior, or CLI interface.
Verification
Reviewers can verify this fix by:
CODE_SIGN_STYLE=ManualandDEVELOPMENT_TEAMset in Xcode project settingsflutter build ipa --release --verboseThe included unit test covers this scenario automatically.
Supersedes #177851 (that PR accidentally included unrelated commits from my fork history). This version only includes the intended change and tests.