Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CP] Upgrading to Xcode 14.3 will not build when plugin transitive dependencies have a low deployment target #124529

Closed
jmagman opened this issue Apr 10, 2023 · 6 comments
Assignees
Labels
cp: approved Approved cherry-pick request cp: merge-to-stable Cherry-picks that should be merged to stable cp: merged Cherry-pick has been merged to the release branch. cp: review Cherry-picks in the review queue

Comments

@jmagman
Copy link
Member

jmagman commented Apr 10, 2023

issue_link

#124340

Commit Hash

c60f20

Target

stable

pr_link

#124527

Impacted Users

App developers running latest Xcode building iOS or macOS apps with certain plugins, including some firebase plugins

Impact Description

When running latest Xcode (14.3) iOS and macOS apps will not build when using certain plugins that have dependencies with very low iOS target versions. This includes any apps that use firebase_auth.

Workaround

  1. Downgrade to Xcode 14.2
  2. Add a workaround to ios/Podfile and macos/Podfile that sets the pods to the same version the Flutter app is targeting. https://stackoverflow.com/questions/75574268/missing-file-libarclite-iphoneos-a-xcode-14-3

Screenshot 2023-04-06 at 1 23 41 PM``

Risk

low

Test Coverage

yes

Validation Steps

  1. Check out 3.7.10 or be on master to pick up Upgrading to Xcode 14.3 breaks iOS app publishing: link_stat failed: No such file or directory #123890
$ flutter create test_create
$ cd test_create
  1. Add a plugin with a lower-than-9 iOS dependency target (I used flutter_appauth) as a pubspec dependency.
$ flutter build ios

On master this does not build:

Error (Xcode): File not found: /Users/m/Applications/Xcode-14-3.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a


Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

On this PR it does build.

@itsjustkevin
Copy link
Contributor

Approving this as it has already been validated by @christopherfujino and @vashworth on the master channel.

@itsjustkevin itsjustkevin added cp: approved Approved cherry-pick request cp: merge-to-stable Cherry-picks that should be merged to stable labels Apr 10, 2023
@christopherfujino
Copy link
Member

LGTM

itsjustkevin pushed a commit that referenced this issue Apr 10, 2023
@itsjustkevin itsjustkevin added the cp: merged Cherry-pick has been merged to the release branch. label Apr 10, 2023
@larssn
Copy link

larssn commented Apr 11, 2023

When running latest Xcode (14.2)

I think you mean 14.3 🙂

Anyway, setting the deployment target to 11 is not a valid workaround for us (in 14.3). It is already set to 13, and the error remains: File not found: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/arc/libarclite_iphoneos.a

This is just an FYI; we're looking at other workarounds

EDIT:
This was the workaround that ended up working (replace the post_install lines in Podfile):

post_install do |installer|
  installer.generated_projects.each do |project|
        project.targets.each do |target|
            target.build_configurations.each do |config|
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
             end
        end
 end
    installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
end

@CaseyHillers CaseyHillers self-assigned this Apr 11, 2023
@jmagman
Copy link
Member Author

jmagman commented Apr 11, 2023

I think you mean 14.3 🙂

Thanks, I did, updated.

EDIT: This was the workaround that ended up working (replace the post_install lines in Podfile):

I linked to https://stackoverflow.com/questions/75574268/missing-file-libarclite-iphoneos-a-xcode-14-3 which says to set IPHONEOS_DEPLOYMENT_TARGET as you did. The screenshot was to show you how to figure out what version to set it to.

We don't really need to document the workaround in detail in this hotfix request, you can check stackoverflow, my point is that the workaround involves manually updating files, which developers shouldn't need to do.

@jmagman
Copy link
Member Author

jmagman commented Apr 12, 2023

@CaseyHillers since this was included in 3.7.11 (thank you!), can this be closed?
https://github.com/flutter/flutter/wiki/Hotfixes-to-the-Stable-Channel#3711-apr-12-2023

@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cp: approved Approved cherry-pick request cp: merge-to-stable Cherry-picks that should be merged to stable cp: merged Cherry-pick has been merged to the release branch. cp: review Cherry-picks in the review queue
Projects
None yet
Development

No branches or pull requests

5 participants