Skip to content

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

Closed

Description

@jmagman

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.

Activity

  1. itsjustkevin commented on Apr 10, 2023

    @itsjustkevin
    Contributor

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

  2. christopherfujino commented on Apr 10, 2023

    @christopherfujino
    Contributor

    LGTM

  3. larssn commented on Apr 11, 2023

    @larssn

    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
    
  4. self-assigned this
    on Apr 11, 2023
  5. jmagman commented on Apr 11, 2023

    @jmagman
    MemberAuthor

    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.

  6. jmagman commented on Apr 12, 2023

    @jmagman
    MemberAuthor

    @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

  7. github-actions commented on Apr 26, 2023

    @github-actions

    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.

  8. locked as resolved and limited conversation to collaborators on Apr 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

cp: approvedApproved cherry-pick requestcp: merge-to-stableCherry-picks that should be merged to stablecp: mergedCherry-pick has been merged to the release branch.cp: reviewCherry-picks in the review queue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions