Skip to content

Override deployment target in CocoaPod dependencies when they're less than Xcode's minimum - #190677

Open
vashworth wants to merge 4 commits into
flutter:masterfrom
vashworth:cocoapod_deployment_override
Open

Override deployment target in CocoaPod dependencies when they're less than Xcode's minimum#190677
vashworth wants to merge 4 commits into
flutter:masterfrom
vashworth:cocoapod_deployment_override

Conversation

@vashworth

Copy link
Copy Markdown
Contributor

Xcode 27 fails to build when dependencies have a deployment target lower than 15 for iOS and 12 for macOS. Previously it was just a warning.

This changes our CocoaPod logic to remove the deployment target of dependencies when it's lower than the minimum to also include transitive dependencies.

Fixes #190676.

Pre-launch Checklist

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

If this change needs to override an active code freeze, provide a comment explaining why. The code freeze workflow can be overridden by code reviewers. See pinned issues for any active code freezes with guidance.

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.

@vashworth
vashworth requested review from a team as code owners August 6, 2026 18:43
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Aug 6, 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 reorganizes build settings logic in podhelper.rb by moving the deletion of IPHONEOS_DEPLOYMENT_TARGET and MACOSX_DEPLOYMENT_TARGET earlier in their respective configuration methods, and updates a test podspec in plugin_tests.dart. Feedback suggests updating an outdated comment in podhelper.rb to reflect that deleting the deployment target avoids build errors in newer Xcode versions rather than just suppressing harmless warnings.

Comment thread packages/flutter_tools/bin/podhelper.rb Outdated
@vashworth
vashworth requested a review from okorohelijah August 6, 2026 18:49
s.source_files = "Classes", "Classes/**/*.{h,m}"
s.dependency 'plugintest'
s.ios.deployment_target = '12.0'
s.osx.deployment_target = '10.14'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The only way to test this is through an integration test, so this is just added the requirements to make the error occur

okorohelijah
okorohelijah previously approved these changes Aug 6, 2026

@okorohelijah okorohelijah 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.

LGTM

Comment thread packages/flutter_tools/bin/podhelper.rb Outdated
@vashworth vashworth added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 6, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Aug 6, 2026
@auto-submit

auto-submit Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

auto label is removed for flutter/flutter/190677, Failed to enqueue flutter/flutter/190677 with HTTP 400: Pull request Required status check "Check Code Freeze" is expected..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CICD Run CI/CD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Xcode 27 CocoaPods IPHONEOS_DEPLOYMENT_TARGET override does not work on CocoaPod dependencies that don't depend on Flutter

2 participants