Search code examples
iosflutterxcode15

After installing new version of XCode 15.0 unable to run app XCode


I have installed new version of Xcode 15.0. After this I am unable to run my flutter app. It is showing me following error:

Error (Xcode): DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead

Solution

  • I have solved those issues 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