skip to Main Content

After upgrading Xcode 15 beta 5, cannot build project.

Error being displayed

Firebase 1 issue
DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

FirebaseAnalytics 1 issue
DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

Tried to deintegrate, reinstall and updating pods, issues doesn’t resolves.

Flutter V. 3.10.6

Is there any way to solve this issue?

3

Answers


  1. it seem Cocoapods issue and it resolved,
    just wait for next public release
    https://github.com/CocoaPods/CocoaPods/pull/12009

    With Cocoapods old version, you can fix this issue by edit Podfile like following

    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
      installer.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
          if config.base_configuration_reference.is_a? Xcodeproj::Project::Object::PBXFileReference
            xcconfig_path = config.base_configuration_reference.real_path
            IO.write(xcconfig_path, IO.read(xcconfig_path).gsub("DT_TOOLCHAIN_DIR", "TOOLCHAIN_DIR"))
          end
        end
      end
    end
    
    Login or Signup to reply.
  2. I solved modifying the pod_install in this way:

    post_install do |installer|
      installer.pods_project.targets.each do |target|
      flutter_additional_ios_build_settings(target)
          target.build_configurations.each do |config|
          xcconfig_path = config.base_configuration_reference.real_path
          xcconfig = File.read(xcconfig_path)
          xcconfig_mod = xcconfig.gsub(/DT_TOOLCHAIN_DIR/, "TOOLCHAIN_DIR")
          File.open(xcconfig_path, "w") { |file| file << xcconfig_mod }
          end
      end
    

    end

    I kept this line of code:

    flutter_additional_ios_build_settings(target)
    

    because without it I have found other problems like:

        Swift Compiler Error (Xcode): No such module 'Flutter'
    /Users/xxxxxxxxxx/.pub-cache/hosted/pub.dev/modal_progress_hud_nsn-0.4.0/ios/Classes/ModalProgressHudNsnPlugin.swift:0:7
    
    
    Encountered error while building for device.
    
    Login or Signup to reply.
  3. Until the fix has been published, just open a Terminal window and run

    find . -type f -exec grep -l 'DT_TOOLCHAIN_DIR' {} ; 
    | while IFS= read -r file; do sed -i '' 's/DT_TOOLCHAIN_DIR/TOOLCHAIN_DIR/g' "$file"; done
    

    After that the error is gone and won’t return unless you run pod update or pod install again, in which case you must run that command again.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search