Xcode 15 issues related to Flutter 3 — fixed

Hi everyone, you may have updated to the latest version of mac OS Sonoma, which forces an update of Xcode. You're not the only passionate person in the world, we're all guilty of it.

But this update brought many unnecessary bugs and caused a lot of panic and sleepless nights to Flutter developers.

In this short article, I will list two common errors that every Flutter app developer encounters after updating to the latest version of their app.

Error 1

Folder name changing issue

Insert image description here
This question will be the first one that pops up when you run a Flutter app in the latest version of Xcode.

make fixed

To solve this problem, you can manually search the folder and replace all instances with TOOLCHAIN_DIR, or you can write a pod script to automatically make the change every time the pod is installed.


post_install do |installer|
  installer.aggregate_targets.each do |target|
      target.xcconfigs.each do |variant, xcconfig|
      xcconfig_path = target.client_root + target.xcconfig_relative_path(variant)
      IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
      end
  end

 .......
 end
    installer.pods_project.targets.each do |target|
  

Guess you like

Origin blog.csdn.net/iCloudEnd/article/details/133482978