Hello folks! I have a problem after updating to xc...
# multiplatform
m
Hello folks! I have a problem after updating to xcode 15 When I try gradle sync my project I see the error
"error: DT_TOOLCHAIN_DIR cannot be used to evaluate LIBRARY_SEARCH_PATHS, use TOOLCHAIN_DIR instead (in target 'FirebaseAnalytics' from project 'Pods')"
In the ios application, I can fix it with post_install in the PodFile. But FirebaseAnalytics is in a shared module and I don't know how to fix it. Maybe somebody knows about it, thanks for helping
x
Xcode 15 hasn't been official supported in KMP. But as a workaround, u can hook gradle task to modify generated Podfile.
n
You can add this to your podfile
Copy code
post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      # Fix a bug since xcode 15. It should be fixed in Cocoapods 1.13.0 <https://github.com/CocoaPods/CocoaPods/pull/12009>
      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 of fix.
    end
  end
end
🙌 1
m
@xiaobailong24 could you help with this gradle task?