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

Xcode 14.3 fix: Pass the -f option when resolving the path to the symlinked source. #11828

Merged
merged 3 commits into from
Apr 2, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/cocoapods/generator/embed_frameworks_script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def script
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
source="$(readlink -f "${source}")"

Choose a reason for hiding this comment

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

This solution is working. I used this workaround for a Flutter project running on 3.7.7.
Thanks, @chrisvasselli

Choose a reason for hiding this comment

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

good job bro. Thanks!

Choose a reason for hiding this comment

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

This looks great. We have been dead in getting our pipeline fixed with Xcode 14.3. I hope this PR gets merged soon!

Choose a reason for hiding this comment

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

Hi, I cant fix it with my Flutter project. Could you help me please?

Copy link

@jaybhum jaybhum Apr 1, 2023

Choose a reason for hiding this comment

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

Hey nickjun03,

Hi, I cant fix it with my Flutter project. Could you help me please?

I managed to solve the issue by doing the following:

  1. Download the cocoapods repository and extract it in a folder
  2. make the change in embed_frameworks_script.rb as shown above
  3. Follow the steps for 'Set up a local dev copy of CocoaPods' here : https://guides.cocoapods.org/using/unreleased-features . The real world walk through is very helpful. I did not have to perform 'git checkout swift' by the way. If you are missing bundle, you can install it by: sudo gem install bundler:2.3.26
  4. In your Flutter's ios folder, you can perform pod deintegrate , delete podfile.lock,
  5. I had to ensure that the iOS development version needs to be at least 9.0. So I edit the last block of Podfile to be:
post_install do |installer|
  installer.pods_project.targets.each do |target|
    flutter_additional_ios_build_settings(target)
  end
  installer.generated_projects.each do |project|
        project.targets.each do |target|
            target.build_configurations.each do |config|
              if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 9.0
                config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
              end
             end
        end
 end
end
  1. Then do pod install but with the local installation, like this example: /Users/orta/spiel/ruby/CocoaPods/bin/pod install
  2. Then, perform Archive (DO NOT Run in Flutter before that! That will re-do pod install with the system's Pod and negate Step 6.)

I hope this helps!

Choose a reason for hiding this comment

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

Flutter 3.7.10 has fixed this: flutter/flutter#123890

Choose a reason for hiding this comment

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

upgrade Flutter 3.7.10 solution for my

Choose a reason for hiding this comment

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

Doesn't work in some cases:
flutter/flutter#124081 (comment)

Copy link

Choose a reason for hiding this comment

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

this works after spending days Thanks !!!! for flutter edit find file called
Pods-Runner-frameworks.sh
and then search for this

source="$(readlink "${source}")"

and add the -f

Enjoy <3

Choose a reason for hiding this comment

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

Thank you soo much. Works like a charm.

fi
if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then
Expand Down