Skip to content

Conversation

@LouiseHsu
Copy link
Contributor

@LouiseHsu LouiseHsu commented Oct 14, 2024

Running pod install on Xcode projects with new test/targets in Xcode 16 will fail. Since this is a Cocoapods bug, this PR adds a warning to the tool that links to a github work around and the current tracking issue.

Fixes #156733
Screenshot 2024-10-14 at 14 48 39

Pre-launch Checklist

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

@github-actions github-actions bot added tool Affects the "flutter" command-line tool. See also t: labels. a: desktop Running on desktop labels Oct 14, 2024
@LouiseHsu LouiseHsu changed the title https://github.com/flutter/flutter/issues/156733init Add a tool warning when pod install does not work after adding a new test/watch/extension/other target with Xcode 16 Oct 14, 2024
@LouiseHsu LouiseHsu marked this pull request as ready for review October 14, 2024 22:49
@LouiseHsu LouiseHsu requested a review from jmagman October 14, 2024 22:49
Comment on lines 510 to 514
'Error: CocoaPods has not been updated to support Xcode 16 and cannot '
'currently handle synchronized groups and folders. '
'See https://github.com/CocoaPods/CocoaPods/issues/12456\n'
'For a workaround, please refer to this Github issue: \n'
'https://github.com/flutter/flutter/issues/156733',
Copy link
Member

Choose a reason for hiding this comment

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

That's a lot of red text. How about: "Error: CocoaPods does not support Xcode 16 synchronized groups. To fix your Xcode project, see #156733 for more information."

But update that link to a very specific comment (that you probably have to write) with exactly how to open your Xcode workspace, to go through all the folders and convert to groups, including in all targets (test, watch, extensions, etc), with screenshots.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oh good idea, I didnt even think about that

Copy link
Member

Choose a reason for hiding this comment

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

(the instructions should also include how to open the macOS workspace since it has the same problem)

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.

LGTM!

Can you kick off a beta cherry-pick by adding cp: beta and updating the PR the bot creates?

Thank you!

_logger.printError(
'Error: CocoaPods does not support Xcode 16 synchronized groups. '
'To fix your Xcode project, '
'see https://github.com/flutter/flutter/issues/156733#issuecomment-2415359014 '
Copy link
Member

Choose a reason for hiding this comment

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

Awesome, thank you! (I took the liberty of editing the comment since the "package contents" part isn't needed, you can open the workspace in Xcode without that).

@LouiseHsu LouiseHsu added cp: beta cherry pick this pull request to beta release candidate branch autosubmit Merge PR when tree becomes green via auto submit App and removed cp: beta cherry pick this pull request to beta release candidate branch autosubmit Merge PR when tree becomes green via auto submit App labels Oct 16, 2024
@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 16, 2024

auto label is removed for flutter/flutter/156758, due to - The status or check suite ci.yaml validation has failed. Please fix the issues identified (or deflake) before re-applying this label.

@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2024
@auto-submit auto-submit bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2024
@auto-submit
Copy link
Contributor

auto-submit bot commented Oct 16, 2024

auto label is removed for flutter/flutter/156758, due to - The status or check suite Windows tool_integration_tests_2_9 has failed. Please fix the issues identified (or deflake) before re-applying this label.

@LouiseHsu LouiseHsu added the autosubmit Merge PR when tree becomes green via auto submit App label Oct 16, 2024
@auto-submit auto-submit bot merged commit 53bff28 into flutter:master Oct 16, 2024
@LouiseHsu LouiseHsu added the cp: beta cherry pick this pull request to beta release candidate branch label Oct 16, 2024
flutteractionsbot pushed a commit to flutteractionsbot/flutter that referenced this pull request Oct 16, 2024
…w test/watch/extension/other target with Xcode 16 (flutter#156758)

Running `pod install` on Xcode projects with new test/targets in Xcode 16 will fail. Since this is a [Cocoapods bug](CocoaPods/CocoaPods#12456), this PR adds a warning to the tool that links to a github work around and the current tracking issue.

Fixes flutter#156733
<img width="567" alt="Screenshot 2024-10-14 at 14 48 39" src="https://github.com/user-attachments/assets/6befa601-4041-46fc-9ca2-f57662adda4a">
Lurchfresser pushed a commit to Lurchfresser/flutter that referenced this pull request Oct 17, 2024
…w test/watch/extension/other target with Xcode 16 (flutter#156758)

Running `pod install` on Xcode projects with new test/targets in Xcode 16 will fail. Since this is a [Cocoapods bug](CocoaPods/CocoaPods#12456), this PR adds a warning to the tool that links to a github work around and the current tracking issue.

Fixes flutter#156733
<img width="567" alt="Screenshot 2024-10-14 at 14 48 39" src="https://github.com/user-attachments/assets/6befa601-4041-46fc-9ca2-f57662adda4a">
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Oct 17, 2024
…ing a new test/watch/extension/other target with Xcode 16 (flutter/flutter#156758)
auto-submit bot pushed a commit that referenced this pull request Nov 5, 2024
…ding a new test/watch/extension/other target with Xcode 16 (#157022)

This pull request is created by [automatic cherry pick workflow](https://github.com/flutter/flutter/blob/main/docs/releases/Flutter-Cherrypick-Process.md#automatically-creates-a-cherry-pick-request)
Please fill in the form below, and a flutter domain expert will evaluate this cherry pick request.

### Issue Link:
What is the link to the issue this cherry-pick is addressing?

#156758 (comment)

### Changelog Description:
Explain this cherry pick in one line that is accessible to most Flutter developers. See [best practices](https://github.com/flutter/flutter/blob/main/docs/releases/Hotfix-Documentation-Best-Practices.md) for examples

CocoaPods does not work properly with Xcode 16 currently, so this change adds a warning to the tool to provide a work around.

### Impact Description:
What is the impact (ex. visual jank on Samsung phones, app crash, cannot ship an iOS app)? Does it impact development (ex. flutter doctor crashes when Android Studio is installed), or the shipping production app (the app crashes on launch)

None. 

### Workaround:
Is there a workaround for this issue?

This change adds a warning to the tool which links to workaround steps

### Risk:
What is the risk level of this cherry-pick?

### Test Coverage:
Are you confident that your fix is well-tested by automated tests?

### Validation Steps:
What are the steps to validate that this fix works?

- Use latest version of Flutter stable channel (Dart 3.5.3, Flutter 3.24.3) with latest CocoaPods (1.15.2) and Xcode 16.
- Clone **flutter/packages** repo and cd into a plugin that have support for macOS but doesn't have native UI/Unit tests. https://github.com/flutter/packages/tree/main/packages/image_picker/image_picker_macos/example/macos is an example.
- Run `pod install` in the example macOS app or run the Flutter app directly with `flutter run -d macos`.
- Follow the steps in https://github.com/flutter/flutter/blob/master/docs/ecosystem/testing/Plugin-Tests.md#enabling-xctests-or-xcuitests to enable **XCTests** or **XCUITests**.
- Run the Unit test directly in Xcode, works as expected.
- Run `pod install`.
- An error should pop up with a workaround linking to 
#156733 (comment)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 12, 2025
…ing a new test/watch/extension/other target with Xcode 16 (flutter/flutter#156758)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
…ing a new test/watch/extension/other target with Xcode 16 (flutter/flutter#156758)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Feb 13, 2025
…ing a new test/watch/extension/other target with Xcode 16 (flutter/flutter#156758)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 6, 2025
…ing a new test/watch/extension/other target with Xcode 16 (flutter/flutter#156758)
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 7, 2025
…ing a new test/watch/extension/other target with Xcode 16 (flutter/flutter#156758)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop autosubmit Merge PR when tree becomes green via auto submit App cp: beta cherry pick this pull request to beta release candidate branch tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

pod install does not work after adding a new test/watch/extension/other target with Xcode 16

2 participants